在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/HTML5  PHP  HTML/ vue-cli,在本地運(yùn)行正常,但打包后資源無(wú)法找到的問(wèn)題

vue-cli,在本地運(yùn)行正常,但打包后資源無(wú)法找到的問(wèn)題

由于項(xiàng)目需要問(wèn)題,我的項(xiàng)目文件下還有好幾個(gè)文件夾與js文件,項(xiàng)目結(jié)構(gòu)大概如此

clipboard.png

clipboard.png
本地是可以正常訪問(wèn)的,但是打包后卻提示我另外加入的靜態(tài)資源找不到

clipboard.png
并且還有一個(gè)報(bào)錯(cuò),估計(jì)是因?yàn)檎也坏轿募l(fā)的,請(qǐng)問(wèn)我應(yīng)該如何配置

index.js下的配置:`build: {

env: require('./prod.env'),
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),

// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: './',

/**
 * Source Maps
 */

productionSourceMap: false,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',

// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],

// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report

}`

回答
編輯回答
兮顏

可能要注意服務(wù)端的訪問(wèn)路徑,你編譯后,在服務(wù)端的路徑和本地時(shí)有出入的

2017年2月14日 21:22