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

Specifying Babel options results in 'import' in the middle of bundle #395

Open
maxhq opened this issue Mar 25, 2021 · 0 comments
Open

Specifying Babel options results in 'import' in the middle of bundle #395

maxhq opened this issue Mar 25, 2021 · 0 comments

Comments

@maxhq
Copy link

maxhq commented Mar 25, 2021

Error:

Build Error (TerserWriter)

"Import" statement may only appear at the top level

Stack Trace and Error Report: /tmp/error.dump.212d6b5aecc3b277dd35bac22e8187ec.log

Steps to reproduce:

npm install -g ember-cli
ember new testapp --lang en
cd testapp/

ember install ember-cli-babel

cat <<'EOF' > ember-cli-build.js
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function (defaults) {
  let app = new EmberApp(defaults, {
    'babel': {
      useBuiltIns: 'usage',
      corejs: {
        version: '2.6.12',
      },
    },
  });
  return app.toTree();
};
EOF

npm run build
@maxhq maxhq changed the title Specifying Babel options results in 'import' statements in middle of output Specifying Babel options results in 'import' in the middle of bundle Mar 25, 2021
oliwel pushed a commit to openxpki/openxpki that referenced this issue Apr 8, 2021
Using a core-js version 3.x polyfill for URLSearchParams is currently
not possible due to bug emberjs/ember-cli-babel#395
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant