Browse Source

Convert babel config to JS for Jest to pick up

pull/11869/head
Travis Ralston 2 years ago
parent
commit
ae010ef649
  1. 4
      babel.config.js
  2. 9
      webpack.config.js

4
.babelrc → babel.config.js

@ -1,4 +1,4 @@
{
module.exports = {
"sourceMaps": true,
"presets": [
["@babel/preset-env", {
@ -22,4 +22,4 @@
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-runtime"
]
}
};

9
webpack.config.js

@ -94,15 +94,6 @@ module.exports = (env, argv) => ({
loader: 'babel-loader',
options: {
cacheDirectory: true,
// These two options are needed to load the babelrc file and
// apply it to node_modules (ie: react-sdk and js-sdk). We
// could put the babel config in this block instead, but we
// publish riot-web to npm for some reason and that seems to
// ship a lib directory. Therefore, we need the babel config
// in a place where babel and babel-loader can reach it.
babelrc: true,
configFile: path.resolve(__dirname, ".babelrc"),
}
},
{

Loading…
Cancel
Save