Commit 75fb81e
committed
Update and configure babel to be able to use latest js syntax in code and deps
- Configure @vue/cli-plugin-babel in vue.config.js to transpile dependencies with js
syntax too modern for our webpack version via transpileDependencies. This makes
@vue/cli-plugin-babel process the listed dependencies with the babel-loader webpack
loader. This now allows to use modern language features like optional chaining.
- Similarly, process code and dependencies via manually set-up babel-loader in
storybook's webpack.config.js, that processes ts and js files, similar to the
babel-loader set-up by @vue/cli-plugin-babel and @vue/cli-plugin-typescrit, which
can be checked via "env build=mainnet yarn vue-cli-service inspect --mode production"
- Dependencies that should be processed, must be listed in transpileDependencies in
vue.config.js and storybook's webpack.config.js.
- To support the latest js syntax, we update @babel/preset-env to the latest version
by updating @vue/cli-plugin-babel to the latest available 4.x version compatible
with webpack 4.
- Also update core-js for the latest polyfills to be available to babel.
- Finally, also update @vue/cli-plugin-typescript and @vue/cli-service to be in line
with @vue/cli-plugin-babel.1 parent 954ab92 commit 75fb81e
File tree
4 files changed
+2271
-1281
lines changed- .storybook
4 files changed
+2271
-1281
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
8 | 32 | | |
9 | 33 | | |
10 | 34 | | |
| |||
17 | 41 | | |
18 | 42 | | |
19 | 43 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
25 | 51 | | |
26 | 52 | | |
27 | 53 | | |
| |||
34 | 60 | | |
35 | 61 | | |
36 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
37 | 70 | | |
38 | 71 | | |
39 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
0 commit comments