Skip to content

Commit afab21c

Browse files
jakeNiemiecgauravtiwari
authored andcommitted
fix: Don't let babel & core-js transpile each other (#2110)
Fixes #2109 Error on fresh app
1 parent 80f3b55 commit afab21c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package/rules/node_modules.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ const { cache_path: cachePath } = require('../config')
33
const { nodeEnv } = require('../env')
44

55
// Compile standard ES features for JS in node_modules with Babel.
6+
// Regex details for exclude: https://regex101.com/r/CglKdg/3/
67
module.exports = {
78
test: /\.(js|mjs)$/,
89
include: /node_modules/,
9-
exclude: /@babel(?:\/|\\{1,2})runtime|core-js/,
10+
exclude: /(?:@?babel(?:\/|\\{1,2}|-).+)|regenerator-runtime|core-js/,
1011
use: [
1112
{
1213
loader: 'babel-loader',

0 commit comments

Comments
 (0)