diff --git a/tsconfig.json b/tsconfig.json index 36e6fba..495fd53 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,8 +4,9 @@ "esModuleInterop": true, "sourceMap": true, "noImplicitAny": true, - "module": "commonjs", - "target": "es6", + "module": "esnext", + "moduleResolution": "node", + "target": "esnext", "jsx": "react" } } diff --git a/webpack.config.js b/webpack.config.js index c808016..ebf3654 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -26,11 +26,6 @@ module.exports = { }, module: { rules: [ - { - test: /\.jsx?$/, - exclude: /node_modules/, - loader: 'babel-loader', - }, { test: /\.css$/, use: ['style-loader', 'css-loader'], @@ -38,7 +33,9 @@ module.exports = { { test: /\.ts(x?)$/, exclude: /node_modules/, - use: 'ts-loader', + // The order of loaders are very important + // It will make the @loadable/component work + use: ['babel-loader', 'ts-loader'], }, { enforce: "pre",