GithubHelp home page GithubHelp logo

Use babel-polyfill about babel-preset-vue-app HOT 4 CLOSED

vuejs avatar vuejs commented on May 5, 2024
Use babel-polyfill

from babel-preset-vue-app.

Comments (4)

egoist avatar egoist commented on May 5, 2024

Thanks for reminding me of the reason why I disabled runtime helpers and polyfills in previous version. So the best solution now is still to disable it and let user handle the polyfill stuffs?

btw, you can still manually include specified polyfills that babel-plugin-transform-runtime does not support into your app. Maybe we can add an option to disable runtime helpers and polyfills.

from babel-preset-vue-app.

alidcast avatar alidcast commented on May 5, 2024

I think it's best to have a smart default with the option of disabling it (or adding to it).

The reason I opened this issue was because Nuxt uses this plugin for babel presets (nuxt/nuxt#271), but since it doesn't provide the original webpack configuration (like Vue templates) it can be cumbersome to modify the entry presets.

If babel-polyfill is recommended for applications, and this plugin is used for app starter templates, what there be a downside of having it as the default?

I ran into a problem where a plugin that I was creating was using babel runtime-helpers, but when I tried to check if a function was an es6 generator or async function, I started getting errors. I wanted to refrain from using babel-polyfill for it, since I saw that it was recommended that they use the runtime helpers and not pollute the global scope. But I will look into providing specific polyfills to babel-runtime in the meantime.

from babel-preset-vue-app.

egoist avatar egoist commented on May 5, 2024

@alidcastano babel-polyfill should be included in webpack entry not here, babel preset can't do this anyways.

from babel-preset-vue-app.

alidcast avatar alidcast commented on May 5, 2024

Ok, that's true. I will go ahead and close this issue then and open one instead on the Nuxt repo.

from babel-preset-vue-app.

Related Issues (12)

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.