Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formatStats.js uses hard coded output path #809

Closed
vladra opened this issue Feb 9, 2018 · 0 comments
Closed

formatStats.js uses hard coded output path #809

vladra opened this issue Feb 9, 2018 · 0 comments
Labels

Comments

@vladra
Copy link

vladra commented Feb 9, 2018

Version

3.0.0-alpha.9

Reproduction link

https://github.com/vladra/vue-cli-bug

Steps to reproduce

  1. Create brand new vue-cli 3 application
  2. Edit vue.config.js to have this contant:
module.exports = {
  configureWebpack: {
    output: {
      path: path.resolve(__dirname, './other_folder'),
    },
  },
};
  1. 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants