write-css-assets-webpack-plugin
v1.0.6
Published
output css assets/chunk mapping to manifest file
Downloads
6
Maintainers
Readme
这个插件的作用
用于将webpack stats中的关于css的chunk/assets的映射关系输出到main.js
(默认)文件的头部:
window.__CSS_CHUNKS__= {"components/Async":"/components/Async.css","main":"/main.css"};
一般会和extract-css-chunks-webpack-plugin
插件配合使用,更多可以参考react-universal-component
以及babel-plugin-universal-import
如何使用
plugins: [
new WriteCssAssetsPlugin()
]
选项
options: {
assetName: string, // 默认值是main.js
}