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

Webpack override remain when recreating project #4876

Closed
tmjoen opened this issue Nov 22, 2019 · 3 comments
Closed

Webpack override remain when recreating project #4876

tmjoen opened this issue Nov 22, 2019 · 3 comments

Comments

@tmjoen
Copy link

tmjoen commented Nov 22, 2019

Version

4.0.5

Environment info

Environment Info:

  System:
    OS: macOS Mojave 10.14.5
    CPU: (8) x64 Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
  Binaries:
    Node: 12.12.0 - /usr/local/bin/node
    Yarn: 1.19.1 - /usr/local/bin/yarn
    npm: 6.11.3 - /usr/local/bin/npm
  Browsers:
    Chrome: 78.0.3904.87
    Firefox: 69.0.1
    Safari: 12.1.1
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0
    @vue/babel-plugin-transform-vue-jsx:  1.1.2
    @vue/babel-preset-app:  4.0.5
    @vue/babel-preset-jsx:  1.1.2
    @vue/babel-sugar-functional-vue:  1.1.2
    @vue/babel-sugar-inject-h:  1.1.2
    @vue/babel-sugar-v-model:  1.1.2
    @vue/babel-sugar-v-on:  1.1.2
    @vue/cli-overlay:  4.0.5
    @vue/cli-plugin-babel: ^4.0.0 => 4.0.5
    @vue/cli-plugin-eslint: ^4.0.0 => 4.0.5
    @vue/cli-plugin-router: ^4.0.0 => 4.0.5
    @vue/cli-plugin-vuex: ^4.0.0 => 4.0.5
    @vue/cli-service: ^4.0.0 => 4.0.5
    @vue/cli-shared-utils:  4.0.5
    @vue/component-compiler-utils:  3.0.2
    @vue/eslint-config-standard: ^4.0.0 => 4.0.0
    @vue/preload-webpack-plugin:  1.1.1
    @vue/web-component-wrapper:  1.2.0
    eslint-plugin-vue: ^5.0.0 => 5.2.3
    vue: ^2.6.10 => 2.6.10
    vue-apollo: ^3.0.0-beta.11 => 3.0.0
    vue-cli-plugin-apollo: ^0.21.3 => 0.21.3
    vue-eslint-parser:  5.0.0
    vue-hot-reload-api:  2.3.4
    vue-loader:  15.7.2
    vue-router: ^3.1.3 => 3.1.3
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.10 => 2.6.10
    vue-template-es2015-compiler:  1.9.1
    vuex: ^3.0.1 => 3.1.2
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

  • Existing Vue cli 3 project test has webpack overrides in vue.config.js
  • Copy existing project test to test_old
  • vue create test with Vue cli 4
  • Create a new vue.config.js with no overrides
  • vue inspect shows overrides from previous project with same name.

What is expected?

A fresh start with no remnant overrides

What is actually happening?

Overrides from previous project with same name remain.


This is my vue.config.js

→ cat vue.config.js
module.exports = {
  outputDir: '../../priv/static',
  assetsDir: '/',
  runtimeCompiler: true
}

Results in the error:

 ERROR  WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.output.chunkFilename: A relative path is expected. However, the provided value "/js/[name].js" is an absolute path!
   -> The filename of non-entry chunks as relative path inside the `output.path` directory.

This configuration is from the older version!

Vue inspect shows:

<snip>

output: {
    path: '/Volumes/univers/dev/elixir/sites/exhaustion/priv/static',
    filename: '/js/[name].js',
    publicPath: '/',
    chunkFilename: '/js/[name].js'
  },

<snip>

Is there any way to blow out this old cached thing?

Thanks!

@LinusBorg
Copy link
Member

o you copied th project and then ran create again in the old, existing project, explicitly asking not to override anything, keeping /node_modules and everything in place?

That's not a valid use case of create. an existing project has caches in place, i.e. in /node_modules/.cache.

I don't think it's worth tracking this specific behaviour that you describe, as you essentially broke your existing project by doing this.

@tmjoen
Copy link
Author

tmjoen commented Nov 25, 2019

Sorry, I MOVED the existing project from test to test_old.

My apologies for the wrong terminology.

@LinusBorg
Copy link
Member

LinusBorg commented Nov 25, 2019

did you restart your terminal in between? Are you sure you were in the correct folder?

If you still have this problem and can recreate it, please provide a small repo with the exact config that you think is being "cached" so we talk abotu the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants