8000 Use the "outputDir" option instead. Error · Issue #1496 · vuejs/vue-cli · GitHub
[go: up one dir, main page]

Skip to content

Use the "outputDir" option instead. Error #1496

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

Closed
jousi592 opened this issue Jun 7, 2018 · 9 comments
Closed

Use the "outputDir" option instead. Error #1496

jousi592 opened this issue Jun 7, 2018 · 9 comments
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author

Comments

@jousi592
Copy link
jousi592 commented Jun 7, 2018

Version

3.0.0-beta.15

Reproduction link

https://codesandbox.io/s/vue

Steps to reproduce

Set up vue.config.js like this:

module.exports = {

   configureWebpack:{

      output: {
	 path: '../test-folder/',
	 filename: '[name].js',
	 publicPath: '/'
       },
   }
}

And run npm run build

What is expected?

To get build files in the test-folder folder

What is actually happening?

I am getting the: Configuration Error: Avoid modifying webpack output.path directly. Use the "outputDir" option instead.


Should have been fixed in 3.0.0-beta.10

@LinusBorg LinusBorg added the needs reproduction This issue is missing a minimal runnable reproduction, provided by the author label Jun 7, 2018
@jousi592 jousi592 closed this as completed Jun 7, 2018
@benoit-ponsero
Copy link

Hi,

I have the same problem. Why does this issue is closed ?

@jousi592
Copy link
Author
jousi592 commented Jun 9, 2018

@benoit-ponsero
If you can add a reproduction, then it can be re-opened.

I didnt have time to create a repro.

@zoosky
Copy link
zoosky commented Jun 23, 2018

Hi @jousi592 here is the repoduction: I use"@vue/cli-service": "^3.0.0-rc.3" and have the same issue.

You find the repo in the assests folder as a git submodule @ https://github.com/zoosky/hello-exs/assets

 assets git:(master) ✗ yarn build                 
yarn run v1.7.0
$ vue-cli-service build

⠋  Building for production... ERROR  Error: 
               
Configuration Error: Avoid modifying webpack output.path directly. Use the "outputDir" option instead.
               
Error: 

Configuration Error: Avoid modifying webpack output.path directly. Use the "outputDir" option instead.

    at build (/Users/andreas/dev/examples/exlixir/hello/assets/node_modules/@vue/cli-service/lib/commands/build/index.js:137:11)
    at api.registerCommand (/Users/andreas/dev/examples/exlixir/hello/assets/node_modules/@vue/cli-service/lib/commands/build/index.js:64:13)
    at Service.run (/Users/andreas/dev/examples/exlixir/hello/assets/node_modules/@vue/cli-service/lib/Service.js:179:12)
    at Object.<anonymous> (/Users/andreas/dev/examples/exlixir/hello/assets/node_modules/@vue/cli-service/bin/vue-cli-service.js:22:9)
    at Module._compile (internal/modules/cjs/loader.js:702:30)

Does this help?

@zig999
Copy link
zig999 commented Jul 3, 2018

Hello, any workarround for this error?
I'm getting the same msg:
Configuration Error: Avoid modifying webpack output.path directly. Use the "outputDir" option instead.

@kamidev
Copy link
kamidev commented Aug 5, 2018

This works for me.

const path = require('path');

module.exports = {
lintOnSave: true,
outputDir: path.resolve(__dirname, '../priv/static'),
};

@zoosky
Copy link
zoosky commented Aug 7, 2018

@kamidev nice. thx!

@borantula
Copy link

changing it within vue ui created the file below which started working with custom directory. Haven't debugged yet which one helped.

module.exports = {
    publicPath: undefined,
    outputDir: '../public/site/dist',
    assetsDir: undefined,
    productionSourceMap: undefined,
    parallel: undefined,
    css: undefined
}

@opadilla
Copy link

How would I use this to change output filename, library, and libraryTarget?

@dinglittle
Copy link

The same problem , what can I do , chang output library and libraryTarget?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author
Projects
None yet
Development

No branches or pull requests

9 participants
0