Package Exports
- custom-affix-css-loader
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (custom-affix-css-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
custom-affix-css-loader
Introduction
This is a tool for adding CSS affixes,Its runtime depends on the webpack packaging environment。Install
npm install --save-dev custom-affix-css-loaderUsage
After install the loader, adding the following code in your webpack.config.js: loaders:[
{
test: /\.css$/,
loader: 'style-loader!css-loader!custom-affix-css-loader?{"type":"css","pre":"pre","suf":"suf"}'
},
{
test: /\.html$/,
loader: 'html-loader!custom-affix-css-loader?{"type":"html","pre":"pre","suf":"suf"}'
}
] options
You can configure your loader in the form of parameters, like this: {"type":"css","pre":"pre","suf":"suf"}',Where "type" refers to the file type, "pre" refers to the class prefix, "suf" refers to the class suffix。 (css)for example: .container {
background: #FFF;
}after packing: .pre-container-suf {
background: #FFF;
}(html)for example: <div class="container"></div>after packing: <div class="pre-container-suf"></div>