Skip to content

Conversation

jeneser
Copy link
Contributor

@jeneser jeneser commented Mar 30, 2021

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:
The webpack 5 persistent caching automatically enabled to have a better compilation performance.

  • Turn on the filesystem cache by default.
    • buildDependencies
      • @vue/cli-service/webpack.config.js
      • vue.config.js if it exists.
    • cache.name
      • Separate independent persistent cache. Avoid waste when dependencies are switched between each value. Make sure to only pass fs-safe names.
        • build
          • --mode: env mode
          • --target: app | lib | wc | wc-async
          • --modern: targeting modern browsers
          • entry points
        • serve
          • --mode: env mode
          • entry points
    • cache.version
      • Some build dependencies of the build can't be expressed as references to a file.
        • @vue/cli-service version: Most of the internal configurations can be replaced with this option. It is useful when the CLI version is upgraded.
        • args: Argument options related to building.
          • targetDir: Special output directory.
        • VUE_CLI_$、VUE_APP_$、NODE_ENV、BABEL_ENV: Environment variables for all kinds of purposes.
  • Remove cache-loader.
    • It has been marked as deprecated.
  • Implement the --no-cache option for both the serve and build command.
    • Easy for the developer to disable persistent caching.
@jeneser jeneser closed this Mar 30, 2021
@jeneser jeneser reopened this Mar 30, 2021
@haoqunjiang haoqunjiang mentioned this pull request Apr 9, 2021
18 tasks
@jeneser jeneser marked this pull request as ready for review April 15, 2021 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment