diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000000..eb9931d1d1 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,6 @@ +module.exports = function (api) { + const defaultConfigFunc = require("shakapacker/package/babel/preset.js"); + const resultConfig = defaultConfigFunc(api); + + return resultConfig; +}; diff --git a/jest.config.js b/jest.config.js index df6f89cec9..99c9c31e3b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -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, diff --git a/package.json b/package.json index 3dcf9776df..6cafd278b6 100644 --- a/package.json +++ b/package.json @@ -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"