Skip to content

Webpack override remain when recreating project #4876

Closed
@tmjoen

Description

@tmjoen

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions