提交 5342708b 编写于 作者: fxy060608's avatar fxy060608

fix(app): Compatible with vite@3

上级 de37cf58
......@@ -119,7 +119,10 @@ function buildAppCss() {
return
}
const appCssJsCode = fs.readFileSync(appCssJsFilename, 'utf8')
const appCssJsFn = new Function('exports', appCssJsCode)
const appCssJsFn = new Function(
'exports',
appCssJsCode.replace(`export default`, `exports=`)
)
const exports = { styles: [] }
appCssJsFn(exports)
const appCssJsonCode = JSON.stringify(exports.styles)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册