Commit Graph

181 Commits

Author SHA1 Message Date
Haoqun Jiang
4de8c99603 refactor!: replace optimize-cssnano-plugin with css-minimizer-webpack-plugin (#6140) 2020-12-14 09:36:43 +08:00
Yazhe Wang
7e42890394 chore!: bump stylus-loader from v3 to v4 (#6130) 2020-12-09 15:10:23 +08:00
Haoqun Jiang
89b0377c4f feat!: upgrade postcss-loader, using postcss 8 by default (#6108) 2020-12-08 13:21:37 +08:00
Haoqun Jiang
2dbe0be840 feat!: support and use webpack 5 as default (#6060) 2020-12-03 15:16:35 +08:00
Binwei Fang
2373df1630 fix: using lang attribute with empty string in html template (#5992)
Fixes #5945

`lang="en"` may be wrong to users, use empty string instead. See : https://github.com/h5bp/html5-boilerplate/issues/1542
2020-10-26 16:23:09 +08:00
Haoqun Jiang
90d3dfc74e chore!: some trivial dependency major version updates (#5951) 2020-10-15 15:47:45 +08:00
Haoqun Jiang
eda18b0542 fix: shouldn't remove attribute quotes in HTML (#5899) 2020-09-27 16:35:30 +08:00
Haoqun Jiang
9e5b16b001 fix: enable some syntax extensions by default for vue script compiler (#5868) 2020-09-10 19:46:23 +08:00
Haoqun Jiang
7458103822 fix: ensure Dev Tool is enabled in Vue 3 runtime (#5788)
The old alias `@vue/runtime-dom` was introduced because webpack HMR has
trouble with pure re-exports. Now that the `vue.runtime.esm-bundler.js`
file also includes a call to `initDev`, it's no longer an issue. This
also enables Dev Tool in Vue 3 runtime.

Fixes #5785
2020-08-15 00:38:37 +08:00
Haoqun Jiang
8cf3745ef9 fix: load vue from @vue/cli-service-global on vue serve/vue build (#5774) 2020-08-11 16:53:44 +08:00
Necmettin Karakaya
5baec1fdc5 chore: fix common misspelling errors (#5694)
Co-authored-by: Haoqun Jiang <haoqunjiang@gmail.com>
2020-08-10 01:17:01 +08:00
Haoqun Jiang
b1772cadd2 feat: allow choosing vue version on creation (and in presets) (#5637) 2020-07-24 18:54:15 +08:00
Haoqun Jiang
8600585481 feat: detect and compile Vue 3 projects (#5570) 2020-06-24 15:09:28 +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
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
Haoqun Jiang
1a0b59142a refactor: use dependencies from @vue/cli-share-utils whenver possible 2019-11-29 15:41:18 +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
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
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
a8df1df26c fix: fix css.loaderOptions.css.modules default values (#4363)
fixes #4357
2019-07-29 22:20:53 +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
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
Haoqun Jiang
d81d57beec fix: fix dev mode compatibility with workers (#4034)
fixes #3539
2019-05-21 22:19:57 +08:00
achretien
59b106ad04 feat: enable hmr for 'mini-css-extract-plugin' in dev (#4011) 2019-05-17 16:33:23 +08:00
Haoqun Jiang
2ec3fca99a feat!: upgrade to webpack-chain v5 (#3913) 2019-04-30 10:31:17 +08:00
Haoqun Jiang
dfe3987d9f feat!: enable splitChunks by default even in development mode (#3863)
BREAKING CHANGE:
This changes the output directory structures for development mode
(app.js -> index.js + chunk-common.js + chunk-vendors.js).
By enabling splitChunks by default, the memory usage of webpack may be
greatly reduced for large multi-page projects.

This commit fixes #3838
May also fix #2991
2019-04-30 10:18:32 +08:00
Haoqun Jiang
678bfc6b2d feat!: set whitespace: 'condense' for template compiler (#3853)
BREAKING CHANGE:
Detailed explanation: https://github.com/vuejs/vue/issues/9208#issuecomment-450012518

Take the following template as example:
```
<p>
  Welcome to <b>Vue.js</b> <i>world</i>.
  Have fun!
</p>
```

With `preserveWhitespace: false`, it was compiled as:
```
<p> Welcome to <b>Vue.js</b><i>world</i>. Have fun! </p>
```

With `whitespace: 'condense'`, it is now compiled as:
```
<p> Welcome to <b>Vue.js</b> <i>world</i>. Have fun! </p>
```

Note the **inline whitespace between tags** is preserved.

Closes #1020
2019-04-30 10:18:03 +08:00
Haoqun Jiang
f5a1950fd2 refactor!: use EnvironmentPlugin instead of DefinePlugin (#3782)
BREAKING CHANGE:
This change breaks use cases where users have tapped the `define`
plugin options in `chainWebpack`

fixes #3579
2019-04-30 10:17:40 +08:00
Haoqun Jiang
b082da83e5 fix: process should be polyfilled rather than mocked (#3878)
To be in line with webpack's default configuration and avoid confusions:
https://webpack.js.org/configuration/node/
2019-04-27 20:03:50 +08:00
Haoqun Jiang
30f2aad0a7 feat: support multi-main entry in pages config (#3595) 2019-04-01 14:18:35 +08:00
Haoqun Jiang
1d14d4d246 feat: support pug as html template (#3663)
closes #3646
2019-03-27 18:02:43 +08:00
Haoqun Jiang
486a921e9f fix: fix reference of friendly-errors-webpack-plugin in config 2019-01-29 19:17:51 +08:00
Haoqun Jiang
9c1e797ac6 feat: support dart-sass as default sass implementation (#3321) 2019-01-28 18:51:55 +08:00
Haoqun Jiang
702a2c9fd0 fix: should respect root parallel option in terser plugin 2019-01-23 22:29:33 +08:00
金振祖
d5b5e3bfde fix: fix loaderOptions.postcss detection (#3201)
fixes #3194
2019-01-08 11:50:05 +08:00