Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use useBuiltIns: usage cause white screen in ios9.3 #10340

Open
Chang1ng opened this issue Aug 15, 2019 · 6 comments

Comments

@Chang1ng
Copy link

commented Aug 15, 2019

Bug Report

Current Behavior
I use the "useBuiltIns": "usage" option in .babelrc file.But cause white screen in ios9.3 version,but ios10+ version is normal.

Input Code

  • My config is :
{
  "presets": [
      [
          "@babel/preset-env",
          {
              "modules": false,
              "targets": {
                  "browsers": [
                      "iOS >= 9.3",
                      "android >= 67"
                  ]
              },
              "useBuiltIns": "usage",
              "corejs": 3,
              // "exclude": ["es.promise"],
          }
      ]
  ],
  "plugins": [
    "@babel/plugin-syntax-dynamic-import",
    "@babel/plugin-syntax-import-meta",
    "@babel/plugin-proposal-class-properties",
    "@babel/plugin-proposal-json-strings",
    [
        "@babel/plugin-proposal-decorators",
        {
            "legacy": true
        }
    ],
    "@babel/plugin-proposal-function-sent",
    "@babel/plugin-proposal-export-namespace-from",
    "@babel/plugin-proposal-numeric-separator",
    "@babel/plugin-proposal-throw-expressions",
  ]
}

Expected behavior/code
I want to use the usage option, it can reduce the file size.

Babel Configuration (.babelrc)

"presets": [
      [
          "@babel/preset-env",
          {
              "modules": false,
              "targets": {
                  "browsers": [
                      "iOS >= 9.3",
                      "android >= 67"
                  ]
              },
              "useBuiltIns": "usage",
              "corejs": 3,
              // "exclude": ["es.promise"],
          }
      ]
]

Environment

  • Babel version(s): [7.4.5]
  • Node/npm version: [Node 8.12.0/npm 6.4.1]
  • OS: [e.g. IOS9.3]
  • How you are using Babel: [webpack/babel-loader]

Possible Solution
Use useBuiltIns:entry instead of usage

Additional context/Screenshots
Maybe is 'es.promise' cause this, because i add config: "exclude": ["es.promise"], this ios9.3 is normal.

@babel-bot

This comment has been minimized.

Copy link
Collaborator

commented Aug 15, 2019

Hey @Chang1ng! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite.

@nicolo-ribaudo

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

This is probably a duplicate of zloirock/core-js#615

Could you ensure that core-js in your dependencies is 3.2.1?

@Chang1ng

This comment has been minimized.

Copy link
Author

commented Aug 15, 2019

This is probably a duplicate of zloirock/core-js#615

Could you ensure that core-js in your dependencies is 3.2.1?

"core-js": "3.1.4","regenerator-runtime": "0.13.2"

@nicolo-ribaudo

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

Try updating it to 3.2.1

@Chang1ng

This comment has been minimized.

Copy link
Author

commented Aug 15, 2019

Try updating it to 3.2.1

I tried it, No way.
I use 'usage' option in other two projects is normal. It was so strange.
image

@JLHwung

This comment has been minimized.

Copy link
Contributor

commented Sep 3, 2019

Could you attach the error stack trace?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.