Questions tagged [babel-loader]

718 questions
0
votes
0 answers

webpack 2.0 - babel-loader/index.js' is not a loader (export function or es6 module))

I'm trying to migrate my project from webpack 1.x to webpack 2.x. I upgraded all the loaders and made sure the configs are passed in correctly. However, I'm getting the below error where it complains that babel-loader is not a loader and was…
Satheesh Kumar
  • 404
  • 1
  • 4
  • 12
0
votes
2 answers

Babel : Error: Can't resolve 'bable-loader'

Having a problem with babel-loader or maybe my webpack config. If I use my current implementation works fine, but I know that the test pattern is wrong(i think). Currently a glob, not a regex. If I change it according to doc's, get the following…
alphapilgrim
  • 3,761
  • 8
  • 29
  • 58
0
votes
1 answer

babel-loader not transpiling and without error

Why isn't my babel-loader transpiling? I've added: let x = 'LOL'; console.log(x); to my src/main.js. It doesn't output any errors and creates the output file. But it doesn't transpile es6 syntax to es5. This is my src/main.js var css =…
Hyrule
  • 635
  • 2
  • 10
  • 23
0
votes
1 answer

Loaders failing in Webpack 2. They work separately, but fail when both are included in config file

I have the following in my webpack.config.js file: const webpack = require('webpack'); const path = require('path'); const config = { context: path.resolve(__dirname, 'src'), entry: './app.js', output: { path: path.resolve(__dirname,…
echessa
  • 49
  • 2
  • 8
-1
votes
1 answer

On building, babel-loader outputs a module object with id null - webpack-command reporters/parse throws

Running the webpack command to build my node.js / React project would throw this error: /home/myuser/repos/myproject/node_modules/webpack-command/lib/reporters/parse.js:82 const row = [module.size, module.id.toString(), modulePath,…
hallvors
  • 6,069
  • 1
  • 25
  • 43
-1
votes
1 answer

why babel is not converted es6 to es5 using webpack?

I am trying to convert my es6 syntax ( import and export keyword , arrow function) files in es5 using babel in moduler bundler webpack . I am able to do that but in bundle I saw few arrow function why ? is babel not able to compile those ? I do like…
user944513
  • 12,247
  • 49
  • 168
  • 318
-1
votes
1 answer

how to configure react + webpack + babel on an existing website with a different technology

I have a web application developed in php, jquery and other technologies ... I need to add React to an existing web application only in a part of the application, I would like to know what would be the recommended configuration of webpack + babel
-1
votes
1 answer

Uncaught (in promise) TypeError: Cannot call a class as a function

I recently upgraded my babel versions to latest. After update the normal class is not recognized by babel in my react application and I am getting below error. Uncaught (in promise) TypeError: Cannot call a class as a function .babelrc { …
Hemadri Dasari
  • 32,666
  • 37
  • 119
  • 162
-1
votes
1 answer

Get webpack chunk name in babel-loader

I'm wondering if it's possible to get webpack's entry points and chunk names inside custom babel plugin in babel-loader.
Klimashkin
  • 580
  • 7
  • 18
-1
votes
2 answers

plugins: [ new webpack.LoaderOptionsPlugin({ // test: /\.xxx$/, // may apply this only for some modules options: { modules: ... } }) ]

var webpack = require("webpack"); var path = require("path"); var DIST_DIR = path.resolve(__dirname, "dist"); var SRC_DIR = path.resolve(__dirname, "src"); var config = { entry: SRC_DIR + "/app/index.js", output: { path: DIST_DIR +…
-1
votes
1 answer

Build javascript async/await with webpack 2 and babel-loader

I'm using webpack 2.3.3 to build my node.js application with async/await javascript syntax. Transpiling is done using babel-loader 6.4.1. My package.json looks like this: { (...) "scripts": { "build": "rm -Rf dist; webpack -p --progress…
MDH
  • 125
  • 3
  • 11
-2
votes
2 answers

Trying to run npm install but I am getting errors which I am unsure on how to fix?

I have inherited a project from a previous developer and having a bit of trouble getting it set up and running. I copied the files and then did npm install and now I am being presented with the following: # npm audit report json5 <1.0.2 Severity:…
green_arrow
  • 1,257
  • 7
  • 21
  • 37
-3
votes
2 answers

why babel loader and jsx loader is not working in webpack version 3.x in react app

Package.json this is my package json file. I have already install npm install --save-dev babel-loader babel-core in my app /* Package.json*/ { "name": "tripdetail", "version": "1.0.0", "main": "index.js", "scripts": { …
Devendra
  • 19
  • 1
  • 1
  • 7
1 2 3
47
48