From 914a4ec62cef9c244153c46a2de2577190021a34 Mon Sep 17 00:00:00 2001 From: Pan Date: Mon, 4 Jun 2018 13:07:53 +0800 Subject: [PATCH] chore: assetsPublicPath --- config/index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/config/index.js b/config/index.js index 92ac0ed1..077c6597 100644 --- a/config/index.js +++ b/config/index.js @@ -56,13 +56,18 @@ module.exports = { assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', - // you can set by youself according to actual condition - assetsPublicPath: './', + /** + * You can set by youself according to actual condition + * You will need to set this if you plan to deploy your site under a sub path, + * for example GitHub pages. If you plan to deploy your site to https://foo.github.io/bar/, + * then assetsPublicPath should be set to "/bar/". + * In most cases please use '/' !!! + */ + assetsPublicPath: '/vue-element-admin/', // If you are deployed on the root path, please use '/' /** * Source Maps */ - productionSourceMap: false, // https://webpack.js.org/configuration/devtool/#production devtool: '#source-map',