1、記得改一下config下面的index.js中bulid模塊導出的路徑。因爲index.html裏邊的內容都是通過script標籤引入的,而你的路徑不對,打開肯定是空白的。先看一下默認的路徑。
- module.exports = {
- build: {
- env: require('./prod.env'),
- index: path.resolve(__dirname, '../dist/index.html'),
- assetsRoot: path.resolve(__dirname, '../dist'),
- assetsSubDirectory: 'static',
- assetsPublicPath: '/',
- productionSourceMap: true,