From f109906b42ffbdd99a6161129ac3dcfbf6a82e64 Mon Sep 17 00:00:00 2001 From: Jason Cheng Date: Fri, 13 Oct 2017 17:29:28 +1100 Subject: [PATCH] enhanced asset path to work serverlessly --- build/utils.js | 3 ++- config/index.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build/utils.js b/build/utils.js index 5afbde6a..56b3d8cf 100755 --- a/build/utils.js +++ b/build/utils.js @@ -32,7 +32,8 @@ exports.cssLoaders = options => { if (options.extract) { return ExtractTextPlugin.extract({ use: sourceLoader, - fallback: 'vue-style-loader' + fallback: 'vue-style-loader', + publicPath: '../../' }) } else { return ['vue-style-loader', sourceLoader].join('!') diff --git a/config/index.js b/config/index.js index c43ec8c6..106f7e09 100755 --- a/config/index.js +++ b/config/index.js @@ -9,7 +9,7 @@ module.exports = { index: path.resolve(__dirname, '../dist/index.html'), assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'assets', - assetsPublicPath: '/', + assetsPublicPath: './', productionSourceMap: true, // Gzip off by default as many popular static hosts such as // Surge or Netlify already gzip all static assets for you.