Category "babeljs"

When using babel-loader with webpack, does babel-loader transpile code differently than when using Babel directly?

Are the defaults the same? Do they have different targets? Is babel-loader contingent on webpacks targets? Reason I ask is I am using babel-loader with webpack

Babel (expo) avoid compiling some dev only packages

Currently I have to use some cookie jar to make axios work in jest. axios.defaults.headers.post['Content-Type'] = 'application/json' axios.defaults.headers.comm

Why babel alias did not work when set up was all correct?

1.I'm building a react project and try to use Babel to simplified the import. Here is the code for babel.config.js file. module.exports = { presets: ['modul

"Expected an arrow function after this type parameter declaration" error

I got this error while running yarn start: $ yarn start yarn run v1.22.17 $ run-s build exec $ babel src/ -d lib/ SyntaxError: .../src/App.js: Expected an arrow

Is there any way to better visualise typescript errors?

I am using babel typescript preset to transpile my code. Some TS errors that I am getting emitted in the console could use some better formatting. I wonder if t

typescript + eslint + babel issue in expo project: lots of Parsing errors

eslint is giving me a really hard time > Parsing error: The keyword 'const' is reserved. :eslint > Parsing error: The keyword 'import' is reserved. :esli

Babel doesn't ignore snapshot folder and files

I'm using the following npm build script with Babel 7; "build": "rm -rf dist && babel src/lib --out-dir dist --copy-files --no-copy-ignored", And this

Typescript const enum alternative

More and more modern Typescript transpilers have moved toward a strategy of per-module transpilation, which significantly increases build speed, but eliminates

"Module not found" when migrating to Webpack 5

I am trying to migrate my React app to webpack 5.72.0 (from 4.42.1). So I also have webpack-cli (4.9.2), webpack-dev-server (4.8.1) and babel (7.17.9). My probl

npm error ENOTEMPTY on babel-loader while npm install

I am trying to install a new dependency and I get this error. Any hint to fix this please ? Thanks! ==> EDIT : I tried to delete that folder and run the npm

Error: Cannot find module '@babel/plugin-proposal-private-methods'

When checking out of the latest master, I receive the following error when I try to build Webpack. The only noticeable change was a single gem that was installe

Force Webpack to use ES6 syntax in react-app bundle [duplicate]

My aim would be to have ES6 syntax (or latest one) in my entire react-app built. I've already managed to avoid polyfills in my own code by omi

Next failed to load SWC binary

When trying to run the command using nextjs npm run dev shows error - failed to load SWC binary see more info here: https://nextjs.org/docs/messages/failed-load

jest issue with typescript react components

I'm currently having an issue with Jest and Typescript inside a Lerna mono repo. Inside the test file, I've imported the component import { Doctor } from '../sr

"Parsing error: No babel config file detected" when IDE not open at Vue projects root directory

I stumbled into a problem where in VS Code, when a Vue project is created and not open at root directory of the Vue project, babel.config.js wouldn't load and I

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@babel/plugin-preset-react' imported from

when I run the command to build the react project: yarn build show error: ➜ react-admin git:(master) ✗ yarn build yarn run v1.22.17 $ webpack --

Jest Call retries were exceeded

I have error in the following below test. My node version is : v12.10.0. is there any alternative of setTimeout? test('demo code', async () => {

React Native Metro bundler resolver issue with json (None of these files exist)

I have monorepo with React code and React Native code. react - common - - file.json ... react-native - App.js In App.js I tried to import json file from react/

Will my code be transpiled twice if I use TypeScript in a Vue.js 3 project?

I'm not very experienced in either TypeScript, Vue, or the Node ecosystem. I have a working setup created using Vue CLI, with Vue 3 and TypeScript, pretty much

How to enable import assertions for Babel?

In my React app I want to use import assertion: import data from "./json/clients-m.json" assert { type: "json" } However, I get the following error: ERROR in