* fix(lib): replace "url" module with simple string split (close#4667)
Fixes issue #4667 by implementing the proposal https://github.com/vuejs/vue-cli/issues/4667#issuecomment-548464520
Also gets rid of a node module by using simpler code for removing eventual GET parameters
* Update packages/@vue/cli-service/lib/commands/build/formatStats.js
Co-Authored-By: Haoqun Jiang <haoqunjiang@gmail.com>
* refactor: use babel overrides to transpile babel runtime helpers
As recommended in babel/babel#9903.
Get rid of the module-resolver plugin, may fix#3928.
Seems to have fixed#4742 as well.
There may be a small breaking change: as we now use `excludes` & `includes`, babel requires `filename` option to be present (introduced in https://github.com/babel/babel/pull/10181/files). So users who call `babel.transformSync` directly may encounter an error.
However, as we explicitly stated that this preset is only used for Vue CLI internally, I don't expect too many such use cases there. And the error messages are clear enough.
Considering the benefits that this PR brings, I think it's an acceptable tradeoff.
test: update tests for babel
* test: fix windows tests
* test: remove unused variables
* fix: fix scope package paths on Windows
* test: wait some time in router tests in case dom hasn't updated in time
* Enforces require.resolve for loaders
* Updates the lockfile
* Fixes more things
* Adds an extra check
* test(loaders): fix the tests
* style(cli): fix the linting
* style(cli): fix the linting (on windows)
* Update package.json
* Updates the lockfile
* chore: sync dependency versions
* chore: sync dependency versions
* chore: don't introduce unnecessary changes in yarn.lock
* extraneous space
BREAKING CHANGE:
The only real breaking change is https://github.com/webpack-contrib/terser-webpack-plugin/issues/129,
which is not likely to affect normal users.
The rest are default option values changes, which are already covered in
the default provided `terserOptions` of Vue CLI.
Note that here we choose to disable `extractComments` by default, as I
don't see enough data showing such license comments taking too much
space. The extra LICENSE file may also be confusing to some users.
As long as the `minimize` option is set to false (which is default in
production mode), the code won't be minimized. So the mode doesn't
matter when it comes to the `minimizer` config.
By exposing this config, users can simplify their custom config, by
removing the `process.env.NODE_ENV === 'production'` guard around their
custom minimizer configuration.