1. rewrite-css-publicpath-webpack-plugin
rewrite css publicPath
rewrite-css-publicpath-webpack-plugin
Package: rewrite-css-publicpath-webpack-plugin
Created by: longshihui
Last modified: Sun, 15 May 2022 23:43:50 GMT
Version: 1.0.0
License: MIT
Downloads: 33
Repository: https://github.com/longshihui/rewrite-css-publicpath-webpack-plugin

Install

npm install rewrite-css-publicpath-webpack-plugin
yarn add rewrite-css-publicpath-webpack-plugin

rewrite-css-publicpath-webpack-plugin

Build Status

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

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code