fix: 修复 Bell 生产外壳白屏 (#142) #143
@@ -15,7 +15,7 @@
|
||||
|
||||
<script>
|
||||
|
||||
import variables from '@/styles/variables.scss'
|
||||
import variables from '@/styles/variables.scss?module'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
import { mapGetters } from 'vuex'
|
||||
import Logo from './Logo'
|
||||
import SidebarItem from './SidebarItem'
|
||||
import variables from '@/styles/variables.scss'
|
||||
import variables from '@/styles/variables.scss?module'
|
||||
|
||||
export default {
|
||||
components: { SidebarItem, Logo },
|
||||
|
||||
@@ -20,7 +20,7 @@ import RightPanel from '@/components/RightPanel'
|
||||
import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
|
||||
import ResizeMixin from './mixin/ResizeHandler'
|
||||
import { mapState } from 'vuex'
|
||||
import variables from '@/styles/variables.scss'
|
||||
import variables from '@/styles/variables.scss?module'
|
||||
|
||||
export default {
|
||||
name: 'MainLayout',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import variables from '@/styles/element-variables.scss'
|
||||
import variables from '@/styles/element-variables.scss?module'
|
||||
import defaultSettings from '@/settings'
|
||||
|
||||
const { showSettings, topNav, tagsView, fixedHeader, sidebarLogo, themeStyle } = defaultSettings
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
const valueImports = [
|
||||
['src/store/modules/settings.js', "@/styles/element-variables.scss?module"],
|
||||
['src/layout/index.vue', "@/styles/variables.scss?module"],
|
||||
['src/layout/components/Sidebar/Logo.vue', "@/styles/variables.scss?module"],
|
||||
['src/layout/components/Sidebar/index.vue', "@/styles/variables.scss?module"]
|
||||
]
|
||||
|
||||
describe('GoAdmin shell Sass value imports', () => {
|
||||
it.each(valueImports)('%s explicitly requests CSS Modules exports', (file, request) => {
|
||||
const source = fs.readFileSync(path.join(__dirname, '../../..', file), 'utf8')
|
||||
expect(source).toContain(`from '${request}'`)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user