-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
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
组件样式好像不生效啊。是要配置什么东西么? #7
Labels
bug
Something isn't working
Comments
暂不支持在组件引用时,设置组件级别的 class,例 |
@aOrz 同样发现了这个问题,看了下生成的代码里,组件内的 css 样式被提取到了 vendor.wxss 中,但并未被任何文件引用,导致样式丢失 |
@F-loat 稍后会修复这个bug,你可以先改下webpack 配置 webpack.*.conf.js 中 new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: function (module, count) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf('node_modules') >= 0
) || count >= 2
}
}), 为 new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: function (module, count) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf('node_modules') >= 0
)
}
}), 避免 css 打到 vendor.wxss 中 |
好的,就是去掉 |
Closed
Closed
mark |
@mcu13321 参考最新的 quickstart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如题。
在vue init mpvue/mpvue-quickstart my-project新建的项目里,组件card的class name能正确,但是样式丢失了。是要配置什么东西么?
The text was updated successfully, but these errors were encountered: