I am using create-react-app to build my React application. I’ve added react-svg-loader and using it in this way: But when I am trying to run yarn build – process fails on minification step: Creating an optimized production build… Failed to compile. Failed to minify the code from this file: R…
Tag: webpack
Build error while compiling create-react-app
I am new to Reactjs and am started learning it. I have been trying to start a basic hello world program but its failing at compilation level. Created a start up hello-word program with create-react-app hello-world it gave me a nice folder structure with bunch of files. And Here you can see the compilation err…
Using Webpack HtmlWebpackPlugin
I am very new to webpack and stuffs, I need a solution to separate base href of index.html and src for bundle.js, for development and production as both are different. For Development base href = localhost src = /bundle.js For Production base href = server url src = /dist/bundle.js To solve the above problem …
Trace a Webpack Error/Line Back to its Source Line
Often, if I’m using webpack to compile/transpile code from ES2015 syntax to something my web browser can read (in a single bundle.js file) I’ll end up with an error like this The specific error here isn’t important — what’s important is that Chrome points me towards line 99 of bu…
Webpack throws error when trying to use ts-loader
I’ve looked at all the Google results regarding this issue, but can’t find any reason why it won’t work in my case. I get this error: This is my webpack.config.js: My tsconfig.json: For some reason, the TypeScript syntax is considered invalid and therefore the bundle won’t be created. …
I am getting an “Invalid Host header” message when connecting to webpack-dev-server remotely
I am using as an environment, a Cloud9.io ubuntu VM Online IDE and I have reduced by troubleshooting this error to just running the app with Webpack dev server. I launch it with: $IP is a variable that has the host address $PORT has the port number. I am instructed to use these vars when deploying an app in C…
How to import functions from different js file in a Vue+webpack+vue-loader project
(See end for why this is not a dupe of How do I include a JavaScript file in another JavaScript file?) Javascipt + Vue + webpack + vue-loader noob… stumbling on the simplest of things! I have App.vue which has a template: I’ve declared the isTokenAvailable method in the normal way for Vue inside m…
Webpack, html-webpack-plugin, Error: Child compilation failed
I ‘ve got a problem with my webpack configuration. After implementing html-webpack-plugin I got an Error, there’s whole error stack from generated index.html. Error Stack: Html Webpack Plugin: Error: Child compilation failed: Conflict: Multiple assets emit to the same filename index.html: Error: C…
How to setup react properly
I have been following the react setup instructions on codecademy: When I type in “npm run build” into the terminal I get this error: I can’t seem to figure out how to get it to work. Here is the link to my code on my github: https://github.com/throwkill999/react_demo Answer The error tells y…
Uncaught SyntaxError: Unexpected token import in reactjs app
I have a react app and Im trying to create a dynamic form using react-jsonschema-form, I have the below index.js file below is the .babelrc file and I’ve the webpack config like below package.json once I run the app I’m getting console error Uncaught SyntaxError: Unexpected token import in reactjs…