Questions tagged [babel-loader]
718 questions
0
votes
1 answer
Upgrading webpack4 webpack-merge react issue
I've been trying to get a React project updated to webpack4 but no matter the configuration or advise/solution I try it still errors.
I currently have the following setup:
package.json
{
"name": "PROJECTNAME",
"version": "1.0.13",
…

Rich
- 970
- 2
- 16
- 42
0
votes
3 answers
Can't build react app with webpack [problem with import[path]]
HI:
I create react app with create-react-app
and I need to use webpack to build my project to use it inside Electron as a desktop application
But after I run webpack --mode development --watch
webpack show next error
webpack is watching the files… …

Rihcodo
- 17
- 7
0
votes
2 answers
Unexpected token import(ReactJS & Babel)
When I try to run my application, I get following error:
(function (exports, require, module, __filename, __dirname) { import { Row } from '../grid'
SyntaxError: Unexpected token import
I tried a couple of stackoverflow answers that suggested I…

Dave Kalu
- 1,520
- 3
- 19
- 38
0
votes
0 answers
How to have dynamic code splitting with babel and webpack?
I am trying to get dynamic code splitting using webpack 4 and babel 6 through babel-loader and it's kind of impossible. Look at this code:
import Chunk1 from './chunks/Chunk1'
import('./chunks/Chunk2')
.then( module => {
…

marquex
- 63
- 4
0
votes
1 answer
Webpack - AngularJS app not working on IE11
AngularJS app is using webpack, theres a few modules that was created and those were made to work with webpack as well. When running the app in all browsers everything works perfectly except on IE11. This is the current error being shown in the…

Yusirah White
- 91
- 1
- 7
0
votes
1 answer
Module Build Failed for react application using Webpack4 and Babel
My application is not transpiling the JSX from my react application.
Here is my webpack config for babel:
module.exports = {
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
…

tstreets
- 35
- 1
- 5
0
votes
1 answer
Babel-loader 8 complains about not finding deprecated babel-preset-es2015
with this webpack config:
{ test: /\.tsx?$/,
use:[
{
loader:'babel-loader',
options: {
presets:['@babel/preset-env']
}
},
{
loader:'ts-loader'
}]
},
I get an error message Error: Cannot find…

HenrikBechmann
- 579
- 2
- 5
- 19
0
votes
1 answer
webpack configuration completely scrambled with babel-loader 8
contradictory documentation (use of presets), traps= contradictory error messages (@babel/preset-es2015 vs babel-preset-es2-15) and more. Ugly.
Where do I find definitive documentation to get out of this trap?

HenrikBechmann
- 579
- 2
- 5
- 19
0
votes
0 answers
babel transpile to es5 doesnt work for node_modules
I am trying to run my current project in ie11, but it gives me an error saying SCRIPT1002: syntax error in foundation.js (its part of google's material design classes). The line in question is export default MDCFoundation. Now from what i have red…

hemmoleg
- 125
- 1
- 8
0
votes
1 answer
babel-loader is ignored by webpack config
I'm having some issues with babel-loader and cannot for the life of me figure out what is wrong. It does not seem like babel-loader is transpiling at all and I have a suspicion that the babel-loader is not even being used. The result is the same…

Vegard Stenvik
- 46
- 4
0
votes
0 answers
Loaders issue while compiling the app through webpack
I am learning React by trying to create a small application. Have created the application using create-react-app first and able to compile the code properly. However, I tried to compile the app by creating webpack.config.js file but facing below…

techie_questie
- 1,434
- 4
- 29
- 53
0
votes
1 answer
Missing loaders in custom npm package
I have the following problem:
I'm building a private npm package, which I'm loading from a local git server, to be used among a couple of react applications, but when it's loaded in the application it gives the following error:
Error: Module parse…

tsetsik
- 21
- 3
0
votes
1 answer
ReactJS version 15.6.2: Target container is not a DOM element
I am facing below error and I have no luck in resolving the same. I went through many answers for same issue in Stack Overflow but none of them helping me resolve the issue.
I am using ReactJS v15.6.2, babel-loader 7 and webpack 4.15.0
Here is my…

Hemadri Dasari
- 32,666
- 37
- 119
- 162
0
votes
1 answer
Babel-Loader not parsing ReactDom.render
I'm working on a React tutorial via Youtube and have matched his webpack.config and package.json files but I am getting a strange error when running webpack-dev-server
package.json
{
"name": "react-tutorials",
"version": "0.0.0",
…

adr5240
- 354
- 1
- 2
- 14
0
votes
0 answers
Electron error with Unexpected token import with import of express [Use of babel]
Please help me:
I use electron,angular and an express server (Sequelize,Sqlite)
Angular/Electron is from a github project by maxime gris:
https://github.com/maximegris/angular-electron
for my app server (classic express server):
in api…

JBRandri
- 295
- 2
- 9