Skip to content

Commit 1271fb9

Browse files
committed
Use default babel config from terriajs to build terriamap.
1 parent 320e049 commit 1271fb9

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

buildprocess/webpack.config.js

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
const configureWebpackForTerriaJS = require("terriajs/buildprocess/configureWebpack");
55
const configureWebpackForPlugins = require("./configureWebpackForPlugins");
6+
const defaultBabelLoader = require("terriajs/buildprocess/defaultBabelLoader");
67
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
78
const path = require("path");
89

@@ -36,29 +37,7 @@ module.exports = function (devMode) {
3637
path.resolve(__dirname, "..", "plugins.ts"),
3738
path.resolve(__dirname, "..", "lib")
3839
],
39-
use: [
40-
{
41-
loader: "babel-loader",
42-
options: {
43-
cacheDirectory: true,
44-
presets: [
45-
[
46-
"@babel/preset-env",
47-
{
48-
corejs: 3,
49-
useBuiltIns: "usage"
50-
}
51-
],
52-
["@babel/preset-react", { runtime: "automatic" }],
53-
["@babel/preset-typescript", { allowNamespaces: true }]
54-
],
55-
plugins: [
56-
["@babel/plugin-proposal-decorators", { legacy: true }],
57-
"babel-plugin-styled-components"
58-
]
59-
}
60-
}
61-
]
40+
use: [defaultBabelLoader({ devMode })]
6241
},
6342
// import html file as string
6443
{

0 commit comments

Comments
 (0)