We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.8.3
const path = require('path') const ExtractTextPlugin = require('extract-text-webpack-plugin') module.exports = { publicPath: '/', outputDir: 'dist', configureWebpack: { module: { rules: [ { test: /\.scss$/, use: ExtractTextPlugin.extract({ fallback: "style-loader", use: [ "css-loader", "sass-loader", { loader: 'sass-resources-loader', options: { resources: path.resolve(__dirname, `./src/theme/${process.env.VUE_APP_THEME}.scss`) //主题皮肤文件全局注入 } } ] }) }, ] }, plugins: [ new ExtractTextPlugin({ filename: `theme/${process.env.VUE_APP_THEME}.css`, allChunks: true }), ], }, css: { extract: false, sourceMap: false, }, }
npm run build
打包所有的scss样式
打包scss得到的css文件中的样式 不包含非路由组件
//App.vue 该文件的scss样式和TopNav组件的scss样式不打包
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version
3.8.3
Environment info
Steps to reproduce
npm run build
What is expected?
打包所有的scss样式
What is actually happening?
打包scss得到的css文件中的样式 不包含非路由组件
//App.vue 该文件的scss样式和TopNav组件的scss样式不打包
The text was updated successfully, but these errors were encountered: