Vue cli plugin publicpath

rewrite assets public path

Version: 1.1.1 Updated: 01/15/2019

By: longshihui License: MIT

Downloads Last 30 Days: 597

vue-cli-plugin-publicpath

Build Status

rewrite assets publicPath in production env

中文文档

Install

vue cli

vue add publicpath

yarn

yarn add vue-cli-plugin-publicpath --dev

npm

npm i vue-cli-plugin-publicpath --save-dev

Configuration

vue.config.js

module.exports = {
    baseUrl: '//js.cdn.com',  // js publicPath
    pluginOptions: {
        publicPath: {
            css: '',
            images: '',
            svg: '',
            media: '',
            fonts: ''
        }
    }
}

See this file for config options.

Categories: Vue js