Commit Graph

469 Commits

Author SHA1 Message Date
Haoqun Jiang ebcee9a32c fix: spawn scripts with node, fix modern mode with Yarn 2 (Berry) (#5320)
See https://github.com/yarnpkg/berry/issues/964#issuecomment-587425891
2020-03-27 17:02:23 +08:00
Haoqun Jiang f1bdf7319a refactor: simplify config loading by skip fs.existsSync check (#5305)
Use error code thrown by `require` directly.
This also simplifies module mocking in unit test.
2020-03-24 15:24:52 +08:00
Haoqun Jiang 5b1709abf0 fix(target-lib): fix dynamic public path in a dynamic chunk in Firefox (#5247)
* fix(target-lib): fix dynamic public path in a dynmaic chunk in Firefox

* fix: fix typo

* feat: use external dependency `@soda/get-current-script`

* fix: const -> var, as the `setPublicPath` file is not transpiled
2020-03-23 16:13:55 +08:00
Jadranko Dragoje db64c5b400 feat: wc entry accepts multiple file patterns splited by ',' (#3886) 2020-03-21 21:39:40 +08:00
Haoqun Jiang 5bf6051b75 fix: vue-template-compiler can be optional if @vue/compiler-sfc presents (#5123) 2020-01-30 20:38:39 +01:00
Haoqun Jiang d11ecc2151 fix: correctly calculate cacheIdentifier from lockfiles (#5113)
* fix: correctly calculate cacheIdentifier from lockfiles

follow up of #3865
fixes #4438

* Revert "fix: correctly calculate cacheIdentifier from lockfiles"

This reverts commit dbce88b7cc.

* fix: should take all configFiles and lockfiles into account

The previous implementation is based on the assumption that config files
have precendences, e.g. `.eslintrc.js` will take higher precendence
over `.eslintrc`, and only one will take effect.

This is not accurate however. For example, babel relies on both babel
config and browserslist config, so we need to deal with 2 config files.
2020-01-30 20:36:56 +01:00
Maël Nison 8fcea225b7 feat: adds transparent PnP support to Webpack (#4953)
* feat: adds transparent PnP support to Webpack

* fix: add the plugin name

* fix: now pass tests
2020-01-19 08:18:37 +05:30
Haoqun Jiang bc3e4af3c0 refactor: use the title option in the html template, instead… (#5060)
closes #5056
2020-01-13 19:34:41 +05:30
Bogdan Luca 7b17d6132c fix: use a single websocket connection for HMR (#5069)
* fix(hmr-websocket): add failing test

* fix(hmr-websocket): set injectClient to false, as we inject our own client

* fix(hmr-websocket): change test project name
2020-01-13 21:20:53 +08:00
Marcel Lindig fff9caaca5 feat(cli): add stdin flag to serve (#2411)
* feat(cli): add stdin flag to serve

* add back --public help

* reorder help
2020-01-10 18:12:01 +08:00
Yingya Zhang eaa2b7341f feat: respect existing package.json (#4827) 2020-01-09 20:19:06 +08:00
Kumar Gaurav aeddc6f2c9 refactor: changed var async to isAsync (#4909)
`async` is a javascript keyword, so I suggest this variable name will be less prone to error and confusing.
2019-12-06 10:57:43 +08:00
Haoqun Jiang c4dc8d61c3 refactor: remove unnecessary padEnd & padStart shims
Both features are already supported in Node.js v8+
2019-12-03 23:07:47 +08:00
Haoqun Jiang 1a0b59142a refactor: use dependencies from @vue/cli-share-utils whenver possible 2019-11-29 15:41:18 +08:00
Haoqun Jiang 2652ab6a6b fix: include prereleases for assert*Version calls 2019-11-13 00:14:24 +08:00
Haoqun Jiang 63257931bc fix: don't prepend publicPath with slash (#4816)
fixes #3338
fixes #4184

Actually I don't know why the slash was added in the first place, seems
extraneous to me.
2019-11-09 15:07:39 +08:00
Roman Seidelsohn 26c48992ef fix(lib): replace "url" module with simple string split (close #4667) (#4809)
* 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>
2019-11-08 18:17:58 +08:00
Haoqun Jiang 9ebc2ab3e9 feat: enable postcss+autoprefixer by default internally, reducing boilerplate (#4798)
This also fixes the issue with Yarn PnP that requires `autoprefixer` to
be explicitly listed in the user's project dependency.
2019-11-07 09:28:44 +08:00
Maël Nison 0a5c79be52 Enforces require.resolve for loaders (#4532)
* 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
2019-11-04 16:26:33 +08:00
Haoqun Jiang 08d7761099 chore!: upgrade terser-webpack-plugin to 2.x (#4676)
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.
2019-10-11 14:51:20 +08:00
Haoqun Jiang 01e36f30cf refactor!: use DefinePlugin (again) instead of EnvironmentPlugin (#4673)
* Revert "refactor: use EnvironmentPlugin instead of DefinePlugin"

This reverts commit 7117a096df.

* refactor: use the exported DefinePlugin
2019-10-11 13:14:24 +08:00
Haoqun Jiang e5196f581a fix: fix redundant log messages from webpack-dev-server (#4666)
By replacing the `quiet` option with `logLevel: 'silent'`.

Fixes #4599
2019-10-10 09:59:16 +08:00
Haoqun Jiang f5135d41a5 feat: make the minimizer config available in all modes (#4641)
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.
2019-10-07 00:14:28 +08:00
Haoqun Jiang e63bf6122b fix: avoid accidentally overriding sass config with scss configs (#4637) 2019-10-01 23:30:15 +08:00
Haoqun Jiang ebdb142a4b fix: fix sassOptions merging for scss syntax in sass-loader v8 (#4631)
fixes #4630
2019-09-30 14:02:48 +08:00
Haoqun Jiang cb740ae268 fix: correctly ignore html templates in copy-webpack-plugin (#4613)
Fixes #3597.
Fixes #4299.
2019-09-25 00:19:25 +08:00
Haoqun Jiang 59d6a7c856 docs: rephrase the upgrade notice 2019-09-09 23:01:39 +08:00
Haoqun Jiang 8cc9ea5f81 fix: pause & resume spinners elegantly 2019-09-09 17:23:47 +08:00
Haoqun Jiang af17a9b49f feat: support sass-loader v8 2019-09-09 17:23:21 +08:00
Haoqun Jiang 72ba7505af fix: should not proxy sockjs endpoint (#4550)
fixes #4504
thanks to https://github.com/facebook/create-react-app/pull/7444
2019-09-07 13:02:34 +08:00
Thorsten Lünborg fba2ad0606 feat: --skip-plugins (#4448)
Allow skipping of plugins  from command line

close #4262
close #3830
2019-08-21 15:38:01 +08:00
Roman Pavlov 86f4f5fceb feat(build): add --inline-vue flag to optionally disable externalization of Vue (#4261)
Resolves #4055.
2019-08-19 21:05:46 +08:00
Haoqun Jiang 348e36eedb fix: merge custom externals config correctly, supports array (#4429)
closes #4413
2019-08-15 11:48:48 +02:00
Haoqun Jiang e9fd9a716c feat!: deprecate css.modules in favor of css.requireModuleExtension (#4387)
closes #4376

Since css-loader v3, custom CSS Modules configurations are under the
`modules` field. So when a user customizes these configurations, the `modules`
feature is automatically enabled for all css files.
So we must require the user's explicit consensus or disagreement on whether
these rules apply to all CSS files or not.
2019-08-02 21:14:39 +08:00
Haoqun Jiang 930b4596b1 feat: allow configuring scss options separately from sass (#4386)
closes #4116
2019-08-02 19:45:12 +08:00
Haoqun Jiang c76d2e691d style: add a "no-shadow" linter rule (#4385)
It has become a common source of mistakes.
For example, during PR #4363 I've referred to the wrong `options`
several times due to the variable shadowing.
2019-08-02 18:24:52 +08:00
Haoqun Jiang 2e3fa929fe chore!: remove the already-deprecated baseUrl option (#4388) 2019-08-02 17:12:13 +08:00
Haoqun Jiang a8df1df26c fix: fix css.loaderOptions.css.modules default values (#4363)
fixes #4357
2019-07-29 22:20:53 +08:00
李枨煊 42ecd08d35 fix: fix stats display when chunkFilename contains query string (#4359) 2019-07-29 15:35:12 +08:00
yiliang a2856a750c chore(cli-service): word spelling in comments (#4367) 2019-07-28 20:39:42 +08:00
Haoqun Jiang 2d59c9676c fix: fix css modules configuration in css-loader v3 (#4345)
fixes #4337
2019-07-25 09:56:04 +08:00
Mewes Kochheim de9748a5a5 fix: do not introduce extra level of directory when building lib for scope packages (#4320)
This fixes references to static assets in the bundled script.

Fixes #4311
2019-07-22 19:47:22 +08:00
Haoqun Jiang e2e3469a18 chore!: ensure consistent directory structure for all modes (#4323)
BREAKING CHANGE:
Changing directory strcuture, though now becoming more intuitive, may
still break users' workflows, so it's considered a breaking change.

Fixes #4215.
Fixes #3767.
Fixes #4234
2019-07-21 20:00:31 +08:00
Haoqun Jiang 3dd3774346 chore!: move dev configs into serve command (#4302)
BREAKING CHANGE:
These configs are only meaningful when used with a running dev
server.
Technically, it is a breaking change.
For example, this breaks use cases in which a user runs their own dev
server instead of calling `vue-cli-service serve`.
2019-07-18 16:36:53 +08:00
shadow-light 9faddce63f fix: indexPath should also affect non-production builds (#4057)
fixes #2327
fixes #4247
2019-07-14 22:39:31 +08:00
shadow-light 52ae1c8a9b fix!: make webpack use values consistent (#4230)
The use key is `pug-plain` despite a similar item above it using the key `pug-plain-loader`. This just makes them consistent.
2019-07-14 22:22:59 +08:00
Pavan Kumar Sunkara 362587a966 feat!: make vuex a separate plugin (#4242)
fixes #2335, #4024
2019-07-06 15:13:09 +08:00
Min ho Kim c0aa2bb310 Fix typos (#4241) 2019-07-06 07:09:29 +03:00
Pavan Kumar Sunkara 246ae678cb feat!: make router a separate plugin (#4196)
* refactor: move router to its own plugin

* refactor: rename routerHistoryMode option to historyMode

* test: add @vue/cli-plugin-router tests

* feat: change src/router.js for most common use cases

* fix: fix cli-ui tests

* docs: Remove router root option from docs

* fix: add support for legacy router option
2019-07-05 23:21:29 +08:00
Leon Liu 76e7c38fc8 fix: prefer devServer.public as the custom url for browser to open (#4169)
fixes #3747
2019-06-19 19:23:44 +08:00