Move babel config back to it's own file

It's need for jest to work properly.
This commit is contained in:
Gaetan Craig-Riou
2026-01-06 14:04:55 +11:00
parent 3676acf244
commit fe8200b7e8
3 changed files with 7 additions and 6 deletions

6
babel.config.js Normal file
View File

@@ -0,0 +1,6 @@
module.exports = function (api) {
const defaultConfigFunc = require("shakapacker/package/babel/preset.js");
const resultConfig = defaultConfigFunc(api);
return resultConfig;
};

View File

@@ -179,7 +179,7 @@ module.exports = {
// transform: { "\\.[jt]sx?$": "babel-jest" },
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
transformIgnorePatterns: ["/node_modules/(?!(stimulus.+)/)"],
transformIgnorePatterns: ["/node_modules/(?!stimulus)/"],
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
// unmockedModulePathPatterns: undefined,

View File

@@ -60,11 +60,6 @@
"webpack-merge": "^5.8.0",
"webpack-sources": "^3.3.3"
},
"babel": {
"presets": [
"./node_modules/shakapacker/package/babel/preset.js"
]
},
"browserslist": [
"defaults",
"not IE 11"