Minify: IE Syntax error on minified code evaluation

Created on 7 Nov 2018  路  3Comments  路  Source: babel/minify

Original issue submitted by @attatrol in https://github.com/babel/babel/issues/8980

Bug Report

Current Behavior
IE 11.0.14393.0 returns error Syntax error in regular exception when i try to copy the minified code in its console.

Input Code
REPL link

var regexpUnicodeSupport;
function test() { 
try { new RegExp("\uffff", "u"); regexpUnicodeSupport = true; }
  catch(e) {}
}

Expected behavior/code
Successful evaluation.

Babel Configuration
default minify preset used by REPL

Environment
REPL

bug

Most helpful comment

Any updates? I'm still having this problem with:

"@babel/polyfill": "^7.10.4",
"core-js": "^3.6.5",
"next": "^9.3.0",

and

"useBuiltIns": "usage",

All 3 comments

Any updates? I'm still having this problem with:

"@babel/polyfill": "^7.10.4",
"core-js": "^3.6.5",
"next": "^9.3.0",

and

"useBuiltIns": "usage",

I'm also still having this issue. It's happening in the package object-assign when i inspect the quarrelsome code in IE.... or at least that's the comment above the line to which the error is occurring. I have tried to put in es6-object-assign and use its automatic polyfill at the entry point of the application, but it still produces the same issue. I really need to get this fixed so that my app can move on in development.

I'm currently using (package.json):

   "@babel/plugin-proposal-class-properties": "^7.10.4",
    "@babel/plugin-proposal-object-rest-spread": "^7.11.0",
    "@babel/polyfill": "^7.2.5",
    "@types/react": "^16.4.18",
    "@types/react-dom": "^16.0.9",
    "axios": "^0.18.0",
    "babel-runtime": "^6.26.0",
    "clean-webpack-plugin": "^2.0.1",
    "core-js": "^2.5.7",
    "es6-object-assign": "^1.1.0",
    "handlebars": "^4.1.2",
    "handlebars-loader": "^1.7.1",
    "history": "^4.7.2",
    "html-webpack-plugin": "^3.2.0",
    "node-sass": "^4.9.4",
    "npm": "^6.4.1",
    "raf": "^3.4.0",
    "react": "^16.5.2",
    "react-dom": "^16.5.2",
    "react-html-parser": "^2.0.2",
    "react-router-dom": "^4.3.1",
    "react-spinners": "^0.4.8",
    "rest": "^1.3.1",
    "styled-components": "^5.0.0",
    "util": "^0.12.1"

and in my webpack.config.js (just focusing on babel-loader):

             {
                    test: path.join(__dirname, '.'),
                    exclude: /(node_modules)/,
                    use: [{
                        loader: 'babel-loader?optional=runtime',
                        options: {
                            presets: [
                                [
                                    "@babel/preset-env",
                                    {
                                        useBuiltIns: 'entry',
                                        corejs: '2.5.7',
                                        targets: '> 0.25%, not dead'
                                    }
                                ],
                                "@babel/preset-react"
                            ],
                            plugins: [
                                '@babel/plugin-proposal-class-properties',
                                '@babel/plugin-proposal-object-rest-spread'
                            ]
                        }
                    }]
                }

I can provide as much detail as you need to help figure this out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GabbeV picture GabbeV  路  3Comments

zamb3zi picture zamb3zi  路  3Comments

hzoo picture hzoo  路  5Comments

kristianmandrup picture kristianmandrup  路  6Comments

developit picture developit  路  5Comments