babel-preset-env Questions

1

I'm trying to convert default Vite template JS with Babel/preset-env, to be compatible with older browsers - to es2015. In code generated by Vite still appear const instead of var. I'm using this p...
Scut asked 1/4, 2023 at 12:10

2

Solved

I get different output for different configurations of @babel/preset-env with useBuiltIns used in combination with @babel/transform-runtime. I've read the documentation, but haven't been able to fi...
Harshman asked 3/8, 2020 at 14:42

4

Solved

I'm developing an application created using create-react-app But then I needed to use mediainfojs library, this library requires wasm files, and based on what I understood I couldn't add it using c...
Gasper asked 29/4, 2021 at 19:41

9

I have added presets react and env into my react project using the command below: yarn global add [email protected] [email protected] My package.json file has updated the presets and l...
Gimble asked 9/4, 2020 at 8:25

0

Am I misunderstanding something about or misconfiguring babel/preset-env? I'm using babel configs for vite using vitejs/plugin-legacy, but for AstroJS project. plugins: [ legacy({ targets: ['defa...
Illuminance asked 9/7, 2022 at 8:33

2

I use babel 7.8.3 together with @babel/preset-env, useBuiltIns: 'usage' and corejs: 3. The documentation for @babel/preset-env is not clear to me. Do I need to add the following lines at the top ...
Choragus asked 20/1, 2020 at 11:54

3

I’m testing Babel with browserslist in an npm script. Here is my current package.json, in which Babel is doing what I expect: { "name": "npm-scripts-igloo", "version": "1.0.0", "description": ...

2

Solved

I am using babel-preset-env version - 1.6.1 for my react app, i am getting a error on IE :- Object doesn't support property or method 'assign' this is my .babelrc :- { "presets": [ "react", [ ...
Superfuse asked 12/3, 2018 at 13:21

5

I'm getting this error after updating react-native to "^0.56.0": bundling failed: Error: Plugin/Preset files are not allowed to export objects, only functions. In /Users/ben/vepo/frontend/node_mo...
Isobelisocheim asked 11/7, 2018 at 7:39

2

Solved

I'm working on a web project using Babel 7 with Webpack 4. I've never used Babel before and can't really understand some parts of it. Based on the documentation I'm using @babel/preset-env because ...
Dvina asked 3/10, 2018 at 11:23

2

Solved

the babel docs say the modules default option is auto, what does the auto means? does it transform the "import" to "require" or not? what's the difference between "modules: false" and "modules: aut...
Christmastide asked 22/4, 2019 at 9:54

1

Solved

When using Rollup how can you get it to work with both @babel/preset-env and @babel/polyfill? The docs mentioned to add useBuiltIns: 'usage' but when I do this I get a require is not defined error ...
Supination asked 11/3, 2019 at 23:48

0

My understanding is that the Babel Polyfill emulates a full ES6 environment, whereas babel-preset-env compiles ES6 (and beyond) to ES5 automatically based on the environments (browsers) you need to...
1

© 2022 - 2024 — McMap. All rights reserved.