1.0.0 • Published 7 years ago
rewrite-css-publicpath-webpack-plugin v1.0.0
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 --devor
npm install --save-dev rewrite-css-publicpath-webpack-pluginUsage
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 |
1.0.0
7 years ago