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
3
votes
1 answer

Webpack migration 3 -> 4: Error: Cannot find module 'webpack/lib/optimize/CommonsChunkPlugin'

I'm trying to migrate from webpack 3 to webpack 4. The issue I have is with CommonsChunkPlugin, when I try to run webpack (npm run webpack-dev-server -- --config config/webpack.dev.js), I have the following error: module.js:529 throw err; …
Tonio
  • 4,082
  • 4
  • 35
  • 60
3
votes
3 answers

How to load animate.css with Webpack 3?

I'm trying to load animate.css to my app using following dependencies: https://github.com/daneden/animate.css https://github.com/andreimc/animate-css-webpack I'd like to achieve that I'll be able to configure what animations will load using…
crs1138
  • 926
  • 1
  • 12
  • 23
3
votes
1 answer

Webpack cannot resolve module 'angular' in other libraries

I am using Webpack 3.1.0 for my application which is written in Angular 1. Here is my webpack.config.js: const webpack = require('webpack'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const HtmlWebpackPlugin =…
Bhavesh
  • 237
  • 3
  • 16
3
votes
1 answer

webpack error: File to import not found or unreadable: bourbon , how to fix?

I am trying to load the Bourbon package inside my SCSS files. I am using Angular 2 and this is my webpack 3.0 config: var path = require("path"); var webpack = require("webpack"); module.exports = { devServer: { contentBase:…
bier hier
  • 20,970
  • 42
  • 97
  • 166
3
votes
1 answer

Webpack 3.0: How can I exclude node_modules from build?

I tried to add 'target:node' to the webpack.dev.js to exclude node_modules from my bundle file. This results in an error. Now I have 'target:web' but has the node_modules back in. This is my config file for the applicationpart(trying to use…
bier hier
  • 20,970
  • 42
  • 97
  • 166
3
votes
1 answer

Dynamic import splits code but doesn't lazy load

I want to introduce lazy loading to Vue Router, so that some parts of the code will be loaded only on demand. I'm following the official documentation for Lazy Loading in Vue Router: https://router.vuejs.org/en/advanced/lazy-loading.html So for a…
van_folmert
  • 4,257
  • 10
  • 44
  • 89
3
votes
0 answers

"webpackJsonP is not defined" after upgrading to webpack 3

I get an error since upgrading webpack to version 3 and my other packages to their respective latest versions. I use this for an app with office ui fabric react, however I cannot find the error. From my understanding, the load order of my chunks is…
LeonidasFett
  • 3,052
  • 4
  • 46
  • 76
3
votes
0 answers

Can't found URL when refresh page in react + react-router + express + webpack

I'm new to react-router, express and other stuff. I've been following some tutorial out there about how to prevent "Cannot get URL" when refresh a page in react app. I found so many related Q&A topics about this issue and try it. But, unfortunately…
Rido
  • 717
  • 4
  • 10
  • 23
3
votes
0 answers

Unexpected value 'RoundProgressModule' imported by the module 'AppModule'. Please add a @NgModule annotation

After Updating the packages from angular4 to angular5.0 and angular-svg-round-progressbar1.2.0. It throws error in Browser console Unexpected value 'RoundProgressModule' imported by the module 'AppModule'. Please add a @NgModule annotation. See the…
Vignesh
  • 2,378
  • 3
  • 25
  • 48
3
votes
0 answers

Listing all transitive dependencies used to build a webpack chunk

I've created a demonstration of the problem I'm having on my github account. I have a webpack config with two entry points -- "feature-one" and "feature-two". "feature-one" includes a CSS file, which itself includes a logo: logo.svg. When webpack…
Chris
  • 9,994
  • 3
  • 29
  • 31
3
votes
0 answers

Webpack 3 Hot Reload Very Slow

Info: I am using webpack 3.4.1 with webpack-dev-server 2.5.1 Using the below configuration with '--hot --inline', I get a very slow hot reload. I can remove '--hot' and have very fast reload, but I would prefer to change css on the fly, using hot…
oblivion19
  • 308
  • 2
  • 5
  • 14
3
votes
0 answers

Webpack 3 - ExtractTextPlugin - localIdentName not applying to component from node_modules

I have a Webpack 3 setup using ExtractTextPlugin, and the localIdentName is not applying to the CSS classes generated from node_modules, specifically from the react-spinkit package. I am using a component from react-spinkit, which is…
3
votes
0 answers

webpack base config as a function doesn't work

I'm testing out dev / prod config files using the method from the docs here https://webpack.js.org/guides/production/#simple-approach But when I switch my base config to a function I get the following error WebpackOptionsValidationError: Invalid…
conor909
  • 1,475
  • 14
  • 29
2
votes
0 answers

Webpack 3 - Module not found: Error: Can't resolve ' '

After updating to a new webpack (from 1 to 3), the following error occurs with all aliases (with webpack --display-error-details: ERROR in ./app/components/Units/Material/_/Views/index.css Module not found: Error: Can't resolve './config/root.css'…
A.Burdonskaya
  • 511
  • 1
  • 4
  • 27
2
votes
0 answers

postcss-extract-media-query plugin is invalid

I'm trying to extract some media queries from my css bundles, but unfortunately plugin is not working. ERROR in ./node_modules/css-loader!./node_modules/postcss-loader/src!./node_modules/jscrollpane/style/jquery.jscrollpane.css Module build…
alexlz
  • 618
  • 1
  • 10
  • 24