nuxt上线后static下面的文件需要拿出来才可以访问到,
_nuxt/ 下的编译的js找不到。
没有调用后台接口
###可以考虑下这些js文件在发布时的路径有没有问题
###请问现在这个问题解决了吗?我也遇到了,不知道如何解决
###请问怎么解决的 我也遇到了
###要设置资源访问路径
config/index.js
`build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
// 资源引用的路径
assetsPublicPath: './',
/**
* Source Maps
*/
productionSourceMap: true,
// https://webpack.js.org/config...
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
}`