Closed
Description
Version
3.0.0-alpha.9
Reproduction link
https://github.com/vladra/vue-cli-bug
Steps to reproduce
- Create brand new vue-cli 3 application
- Edit vue.config.js to have this contant:
module.exports = {
configureWebpack: {
output: {
path: path.resolve(__dirname, './other_folder'),
},
},
};
- Run
yarn build
What is expected?
Expected build to be successful
What is actually happening?
Command build files, but fails to finish successfully during the formatStats step.
It seems that file path in formatStats.js
is hardcoded and doesn't use config from vue.config.js
Stacktrace:
fs.js:663
return binding.open(pathModule.toNamespacedPath(path),
^
Error: ENOENT: no such file or directory, open 'PATH/client/dist/js/vendor.13e9fbad.js'
at Object.fs.openSync (fs.js:663:18)
at Object.fs.readFileSync (fs.js:568:33)
at getGzippedSize (PATH/client/node_modules/@vue/cli-service/lib/commands/build/formatStats.js:43:23)
at ui.div.assets.map.a (PATH/client/node_modules/@vue/cli-service/lib/commands/build/formatStats.js:62:7)
at Array.map (<anonymous>)
at formatStats (PATH/client/node_modules/@vue/cli-service/lib/commands/build/formatStats.js:57:12)
at webpack (PATH/client/node_modules/@vue/cli-service/lib/commands/build/index.js:89:17)
at emitRecords.err (PATH/client/node_modules/webpack/lib/Compiler.js:265:13)