rewrite-css-publicpath-webpack-plugin
v1.0.0
Published
rewrite css publicPath
Downloads
24
Maintainers
Readme
rewrite-css-publicpath-webpack-plugin
rewrite css publicPath, only support webpack 4.
Feature
- Support for rewriting mini-css-extract-plugin asynchronous css module publicPath
- Support for rewriting the css loading path in the html file generated by html-webpack-plugin
Install
yarn add rewrite-css-publicpath-webpack-plugin --dev
or
npm install --save-dev rewrite-css-publicpath-webpack-plugin
Usage
webpack.config.js
const RewriteCssPublicPathWebpackPlugin = require('rewrite-css-publicpath-webpack-plugin')
module.exports = {
// other config
plugins: [
new RewriteCssPublicPathWebpackPlugin({
publicPath: '//css.cdn.com'
})
]
}
Options
You can pass a configuration options to rewrite-css-publicpath-webpack-plugin. Allowed values are as follows
| Name | Type | Default | Description | | --- | --- | --- | --- | | publicPath | string | output.publicPath | css publicPath |