Commit Graph

3196 Commits

Author SHA1 Message Date
Haoqun Jiang 4378c8df26 style: replace eslint-plugin-vue-libs with standard config (#6148) 2021-01-06 14:29:12 +08:00
Jakub Niewczas ffc0686e89 fix: fix pwa installability by adding fetch event listener to noopServiceWorker (#5327)
currently google chrome prevents installing pwa due to the error: “Page does not work offline”. The reason is service worker has to listen to fetch event. It doesnt have to do anything so the listener can be an empty function, but it has to be declared
2021-01-06 12:28:17 +08:00
Haoqun Jiang 4549bde150 fix(mocha): workaround the ShadowRoot issue in Vue 3.0.5 (#6186) 2021-01-06 11:45:14 +08:00
前端小武 597b236f77 docs(zh): fix publicPath hash (#6185) [skip ci] 2021-01-05 18:44:28 +08:00
Githoniel a634400529 fix(cli-service): restrict request headers of historyApiFallback in WebpackDevServer (#6162) 2021-01-05 13:40:42 +08:00
Raine Revere 5830171f52 fix: add missing jest-transform-stub media types (#6169) (#6170)
Existing:
- css
- styl
- less
- sass
- scss
- svg
- png
- jpg
- ttf
- woff
- woff2

Added:
- jpeg
- gif
- eot
- otf
- webp
- mp4
- webm
- wav
- mp3
- m4a
- aac
- oga
2020-12-25 16:22:49 +08:00
fxxjdedd 451f3d2f5f feat: make globby includes dot files (#5537)
https://cli.vuejs.org/dev-guide/plugin-dev.html#filename-edge-cases

Although in this passage, it is suggested that we should change ".env" to "_env" to solve the problem of uploading npm packages. But there will also be such a demand, the files in `generator/template` are dynamically pulled from the git repository at runtime, and there may be `.env` files in the repository, so this pr can solve the problem here
2020-12-20 20:02:58 +08:00
Binwei Fang dc4c4559b6 fix(generator): avoid doing redundant write operations (#6011)
Avoid overwriting the file which is not modified when executing `vue add/invoke`
This will reduce the chance of encountering issues like #5939
2020-12-20 19:56:33 +08:00
Cédric Exbrayat d74351456a chore: use webpack-chain v6.5.1 (#6157)
Vue CLI v5.0.0-alpha.0 uses `rule.resolve` in the CLI service (see https://github.com/vuejs/vue-cli/blob/v5.0.0-alpha.0/packages/@vue/cli-service/lib/config/base.js#L17-L20) which was introduced in webpack-chain v6.5.0.

As the CLI service defines a dependency to webpack-chain v6.4.0, this causes issues in existing projects when trying to upgrade to the CLi v5.

Upgrading an existing project leads to `yarn build` throwing:

```
TypeError: Cannot read property 'set' of undefined
    at /Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/lib/config/base.js:20:19
    at /Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/lib/Service.js:240:40
    at Array.forEach (<anonymous>)
    at Service.resolveChainableWebpackConfig (/Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/lib/Service.js:240:26)
    at PluginAPI.resolveChainableWebpackConfig (/Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/lib/PluginAPI.js:145:25)
    at module.exports (/Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/lib/commands/build/resolveAppConfig.js:9:22)
    at build (/Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/lib/commands/build/index.js:147:50)
    at /Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/lib/commands/build/index.js:89:13
    at Service.run (/Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/lib/Service.js:234:12)
    at Object.<anonymous> (/Users/ced-pro/Code/ninjasquad/vue-ebook/book-tests/node_modules/@vue/cli-service/bin/vue-cli-service.js:36:9)
```

This fixes the issue by specifying the necesseray minimal version for webpack-chain.
2020-12-20 15:13:19 +08:00
Binwei Fang 91050b09f5 refactor(generator): minor refactor afterInvoke/afterAnyInvoke (#5993)
make afterInvoke/afterAnyInvoke code more readable and add test
2020-12-18 20:47:27 +08:00
Haoqun Jiang 0372160524 chore: some trivial dependency version bumps (#6152) 2020-12-17 16:24:10 +08:00
Haoqun Jiang 41eb4e9fb9 chore: Merge branch 'master' into dev 2020-12-17 16:16:03 +08:00
JiZhi 9e32481d4c docs: mode-and-env doc need be updated (#6050) 2020-12-17 16:15:31 +08:00
Hollow Man 0716512cf6 docs: fix grammar Mistake in Docs (#6074) [skip ci]
files -> file
Signed-off-by: Hollow Man hollowman@hollowman.ml
2020-12-17 16:15:27 +08:00
汪磊 2e28324600 docs(zh): correction of some format problems (#6036) [skip ci] 2020-12-17 16:15:22 +08:00
JiZhi 6f3fc16431 docs: mode-and-env doc need be updated (#6050) 2020-12-17 16:11:24 +08:00
RJW ced2c34998 docs(zh): fix SyntaxError + = => += (#6147)[skip ci]
lines[renderIndex] + = `\n router,` => lines[renderIndex] += `\n router,`
2020-12-15 12:15:50 +08:00
Haoqun Jiang b5bb095bfd chore: merge changelog from v4 branch 2020-12-15 09:17:23 +08:00
Haoqun Jiang 4573897226 docs: update webpack-4 migrate instructions [skip ci] 2020-12-15 08:46:34 +08:00
Haoqun Jiang 2814c428fa chore: Merge branch 'master' into dev 2020-12-14 23:01:48 +08:00
Haoqun Jiang 5b3ab5d810 fix: temporary workaround for vuepress build 2020-12-14 22:20:35 +08:00
Haoqun Jiang 45cd92c15e chore: fix changelog formatting [ci skip] 2020-12-14 22:20:08 +08:00
Haoqun Jiang 7139e4093a v5.0.0-alpha.0 v5.0.0-alpha.0 2020-12-14 19:48:08 +08:00
Haoqun Jiang ff9671456e chore: pre release sync 2020-12-14 19:47:23 +08:00
Haoqun Jiang a7387ef614 Revert "chore: pre release sync"
This reverts commit ba5caf0c30.

It was accidentally committed when I was testing on my local registry
2020-12-14 19:44:31 +08:00
Haoqun Jiang 81dc30a56f fix: disable eslint for Vue 3 type shim (for now)
See https://github.com/vuejs/vue-cli/pull/6023

It's not the ideal solution, though.

In the long run we should have the shim built-in (either in this plugin
or in the `vue-loader` package), for which ESLint rules should be
properly applied, and the user can simply import that shim module.
2020-12-14 19:21:33 +08:00
Haoqun Jiang e22d7f867a fix: fix title injection of the generated html file 2020-12-14 16:39:27 +08:00
Haoqun Jiang ba5caf0c30 chore: pre release sync 2020-12-14 13:01:33 +08:00
Haoqun Jiang 3b3cd9060b refactor: replace cache-loader with babel-loader's built-in cache (#6142)
It's supposed to have better performance.
See https://github.com/babel/babel-loader/issues/525#issuecomment-375756108

Besides, this improves webpack 5 compatibilities as cache-loader is now
deprecated
2020-12-14 10:41:55 +08:00
Haoqun Jiang c72b6b0abd feat: add a @vue/cli-plugin-webpack-4 package for future use (#6144) 2020-12-14 10:18:38 +08:00
Haoqun Jiang a672585807 fix: fix cypress mirror url for cypress version > 3 (#6145) 2020-12-14 10:08:14 +08:00
Haoqun Jiang 4de8c99603 refactor!: replace optimize-cssnano-plugin with css-minimizer-webpack-plugin (#6140) 2020-12-14 09:36:43 +08:00
Haoqun Jiang b1344c24d4 fix: fix stylus config 2020-12-11 15:43:29 +08:00
Haoqun Jiang 696cbd1f14 chore: dependency and lockfile maintenance 2020-12-11 14:53:13 +08:00
Haoqun Jiang 85c2e007f8 chore!: support v5 alpha as peer dependencies, drop v4 prereleases (#6132) 2020-12-11 14:37:56 +08:00
Haoqun Jiang eee082d331 feat: bump lint-staged to v10 (#6136) 2020-12-11 14:37:25 +08:00
Haoqun Jiang 10fc575778 chore!: bump ejs to v3 (#6133)
The only notable change may be dropping support of the include
preprocessor directive, which I don't know any Vue CLI plugin is using.

<https://github.com/mde/ejs/pull/478/files>
2020-12-11 14:35:07 +08:00
Githoniel ea6151f013 fix: eslint formatter path error (#6134)
Co-authored-by: Binwei Fang <fangbinwei@yeah.net>
2020-12-11 01:19:59 +08:00
Binwei Fang 663bbd7639 fix: fix usage of cmd-shim (#6137) 2020-12-10 20:48:08 +08:00
Haoqun Jiang b9cce99117 test: do not hard-code major version number in test 2020-12-09 16:23:24 +08:00
Haoqun Jiang 04297fdfd0 chore: lockfile maintenance 2020-12-09 16:01:44 +08:00
Haoqun Jiang 2913524632 test: fix tests according to cypress 6 breaking change 2020-12-09 15:58:51 +08:00
Yazhe Wang 7e42890394 chore!: bump stylus-loader from v3 to v4 (#6130) 2020-12-09 15:10:23 +08:00
Haoqun Jiang b96c3bdb08 feat: update eslint-related packages (#6123) 2020-12-09 15:03:38 +08:00
Haoqun Jiang 5c728a4e4d chore!: update typescript-related dependencies (#6129) 2020-12-09 15:03:22 +08:00
Haoqun Jiang f1962ad1e9 feat!: update mocha to v8 (#6121) 2020-12-09 14:33:25 +08:00
Haoqun Jiang a04509dd4a feat: update cypress to v6 (#6120) 2020-12-09 14:32:21 +08:00
Haoqun Jiang 49052f49ff docs: don't add .loader() when modifying vue-loader options [skip ci] (#6128)
See the reasoning at https://github.com/Akryum/vue-cli-plugin-apollo/pull/463
2020-12-09 14:30:35 +08:00
Yazhe Wang 473f3d8abf docs: add devServer.inline in config reference (#6126) [skip ci]
closes #6031
2020-12-09 14:29:47 +08:00
Haoqun Jiang 69b570ed1f chore: update cmd-shim and move it to devDependencies (#6127)
It's only used in the `linkBin` function, which is used for setting up
testing projects.
2020-12-09 09:05:51 +08:00