iDestin / vuecli-publicpath-webpack-plugin

Use it to set the publicpath of webpack in Vuecli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

If your project is using vue-cli and you want to modify the output.publicPath option of webpack, you can use this plugin, otherwise you don't need to use it.

Because vue-cli does not allow direct modification of output.publicPath. see docs

Install

npm install vuecli-publicpath-webpack-plugin -D

Usage

in vue.config.js You can use this plugin through the configureWebpack method

const WebpackPublicPathPlugin = require('vuecli-publicpath-webpack-plugin')

module.exports = {
  ...
  configureWebpack:(config)=>{
    config.plugins = [
      ...config.plugins,
      new WebpackPublicPathPlugin('your cdn path')
    ]
  }
}

About

Use it to set the publicpath of webpack in Vuecli

License:MIT License


Languages

Language:JavaScript 100.0%