Explorar o código

Added optional chaining plugin

Taichi Masuyama %!s(int64=4) %!d(string=hai) anos
pai
achega
ffa453be41
Modificáronse 1 ficheiros con 14 adicións e 6 borrados
  1. 14 6
      packages/app/config/webpack.common.js

+ 14 - 6
packages/app/config/webpack.common.js

@@ -86,13 +86,21 @@ module.exports = (options) => {
               /node_modules\/codemirror/,
             ],
           },
-          use: [{
-            loader: 'ts-loader',
-            options: {
-              transpileOnly: true,
-              configFile: path.resolve(__dirname, '../tsconfig.build.client.json'),
+          use: [
+            {
+              loader: 'babel-loader',
+              options: {
+                plugins: ['@babel/plugin-proposal-optional-chaining']
+              }
             },
-          }],
+            {
+              loader: 'ts-loader',
+              options: {
+                transpileOnly: true,
+                configFile: path.resolve(__dirname, '../tsconfig.build.client.json'),
+              },
+            },
+          ],
         },
         {
           test: /locales/,