GithubHelp home page GithubHelp logo

Comments (6)

Turbo87 avatar Turbo87 commented on July 25, 2024

that is definitely a bug, thanks for reporting! do you have time to open a PR that fixes the issue?

from broccoli-babel-transpiler.

Turbo87 avatar Turbo87 commented on July 25, 2024

I think the right way to do this would be roughly like this:

var babelCorePath = path.dirname(require.resolve('@babel/core/package.json'));

in that case we shouldn't need the regex anymore at all

from broccoli-babel-transpiler.

Elberet avatar Elberet commented on July 25, 2024

Can do, but I'm not certain on the details. From what I can see, things changed quite a bit.
In the Babel packages I'm using - all from the v7 release - the polyfill is found in ./node_modules/@babel/polyfill/browser.js; is that the right file to include? Should it be renamed?

from broccoli-babel-transpiler.

Turbo87 avatar Turbo87 commented on July 25, 2024

to be honest, I don't know. I guess it would make sense to resolve to @babel/polyfill instead then. but in that case, we will need an explicit dependency on it.

from broccoli-babel-transpiler.

Elberet avatar Elberet commented on July 25, 2024

After spending some time with the code and its tests, I'm wondering what the desired outcome of adding the browserPolyfill flag should actually be:

  • just add the polyfill to the output tree?
  • place it somewhere where Babel can resolve it while transpiling source scripts?
  • all of the above?

Is the option even required for the current version of Babel? It's now all designed around separate packagers that eventually pull the polyfill into a bundle, and Babel will happily transpile scripts that require it even without the browser polyfill script visible at transpile-time.

from broccoli-babel-transpiler.

Turbo87 avatar Turbo87 commented on July 25, 2024

to be honest, I don't know the answers to that either. I would suggest to start digging in https://github.com/babel/ember-cli-babel and see if/how that option is used.

from broccoli-babel-transpiler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.