1.0.0 • Published 5 years ago

rewrite-css-publicpath-webpack-plugin v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

rewrite-css-publicpath-webpack-plugin

Build Status npm.io

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

NameTypeDefaultDescription
publicPathstringoutput.publicPathcss publicPath