Questions tagged [webpack-3]

Version 3 of the Webpack bundler. Webpack takes modules with dependencies and generates static assets representing those modules.

About

Released in June 2017. Migrating from Webpack 2 to 3 should involve no effort beyond running the upgrade commands in your terminal.

New Features

  • Scope Hoisting
  • Dynamic Import Syntax

Links

GitHub

183 questions
1
vote
0 answers

webpack - syntactic errors appear encoded in browser console, not in shell (terminal)

when there's a syntax error, for some reason it appears scrambled in the console, but not in the terminal. Not using any extra modules in webpack. Tried googling but can't find anyone having the same issue. using webpack 3.5.5 Please see the…
nuway
  • 2,324
  • 4
  • 27
  • 48
1
vote
1 answer

How to stop Webpack-3's PurifyCSSPlugin from cleaning to much?

Problem Everything else equal, my final pages differ in their CSS result. The prod version lacks the proper flexbox alignment as seen in the following comparison: Dev Prod The problem is caused by the PurifyCSSPlugin. I don't know how to configure…
lony
  • 6,733
  • 11
  • 60
  • 92
1
vote
1 answer

Webpack not building after npm upgrade

I had a minor issue with my React test scripts and I ended up upgrading my npm with following command npm upgrade -g I think this not only upgraded npm ( to 5.3.0) but also webpack ( to 3.4.1), extract-text-webpack-plugin ( to 3.0.0), and every…
1
vote
1 answer

How to get images in webpack production?

There is no images in the production folder. is there any simple way to fix the issue in webpack config ? packaage.json "scripts": { "start": "npm run build", "build": "webpack -d && cp src/index.html dist/index.html && webpack-dev-server…
Mo.
  • 26,306
  • 36
  • 159
  • 225
1
vote
0 answers

Webpack 3: Uncaught TypeError: Cannot read property 'call' of undefined

A lot of people have asked questions about this problem, but it's extremely general and none of the solutions apply to me. After restarting my PC and rerunning webpack, I suddenly get the error in the title in my browser. No code was changed. The…
1
vote
1 answer

webpack 3 long term caching not work

I'm attempting to use webpack v3 to test long term caching. When I build twice by webpack(just make a change to index.jsx file), and the hash value changed to vendor file. webpack.config.js Reference:Caching const webpack =…
1
vote
0 answers

Is there a way to add script like console.log(var) only on webpack dev server for development purpose?

For development purpose, Is there a way to add script like console.log(var) only on webpack-dev-server? Not for webpack -p mode.
Dreamer
  • 53
  • 1
  • 8
1
vote
0 answers

Webpack erroring on bundling font awesome

I'm having issues with my webpack build (v3), it's a migration from v1 however, it breaks on the importing of the font-awesome file (css) I have on my app.js page. This is the response from webpack: ERROR in…
1
vote
0 answers

'Path must be a string. Received undefined' in `Gulp.dest`

What I Get gulpfile.js outputs the following error: path.js:7 throw new TypeError('Path must be a string. Received ' + inspect(path)); ^ TypeError: Path must be a string. Received undefined at assertPath (path.js:7:11) at…
ilyaigpetrov
  • 3,657
  • 3
  • 30
  • 46
1
vote
0 answers

Aurelia and Webpack 3

I just upgraded from Webpack 2.x to the latest 3.0, and my Aurelia app breaks at load time with the following message: Uncaught (in promise) No PLATFORM.Loader is defined and there is neither a System API (ES6) or a Require API (AMD) globally…
Benny Halperin
  • 1,872
  • 3
  • 13
  • 18
0
votes
0 answers

Unexpected token: name (p) Error with webpack and uglify

I am trying to Build the React application using webpack(3.5.5). But the build is getting failed. tried building with adding UglifyJSPlugin by installing the npm package, But of no use. Constantly getting the following errors. Unexpected token: name…
Siva
  • 61
  • 1
  • 5
0
votes
0 answers

JS file not generating in the same order after Webpack 4 Upgrade

I am in the process of upgrading my site from Webpack 3 to Webpack 4. I'm noticing with the new Webpack 4 configuration, the JavaScript file compiles without errors, but an interactive map on the homepage doesn't generate correctly. Therefore,…
0
votes
0 answers

How to run the webpack 3 project in a local system?

I have a webpack project 3 and I want to run it on my local system. Here is my webpack config file and the package.json { "private": true, "name": "XXx", "version": "Xxx", "description": "X", "main": "index.js", "dependencies": { …
shrey
  • 1
  • 2
0
votes
1 answer

when I use the word async in webpack-3 the function not work

I was using async: false in ajax. I want to have the equivalent of this command in fetch. Apparently using async helps. But when I use the word async in the webpack, it does not work. i use webbpack 3.8.1 and in webpack.config.js: const path =…
reza
  • 1
  • 1
0
votes
1 answer

webpack "invalid configurations object"

i had to update my webpack from 3 to 5 and i have a ejected CRA and after upgrading my webpack i am getting error of "Invalid configurations object.Webpack has been initialized using a configuration object that does not match the API schema". below…