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
8
votes
5 answers

Module not found when import .jsx file

I can't find out the solution. I'm using Reactstrap (CSS framework), React, Express, and Webpack. I was success to import App.jsx file on index.jsx. Then, I tried to import NavbarTemplate.jsx file on App.jsx by using the same way. But, it displayed…
Rido
  • 717
  • 4
  • 10
  • 23
7
votes
4 answers

Images GETs throw 404 error in production using Webpack and AngularJS

I have this conundrum I can't solve after many tryouts: I'm unable to load static images in production; everything is fine while developing (npm run serve), even when serving files from dist (npm run serve:dist) Versions Webpack:…
Gargaroz
  • 313
  • 9
  • 28
7
votes
0 answers

Webpack 3 to 4 - CommonsChunkPlugin to splitChunks Conversion

Failing to migrate to Webpack 4. I'm providing a library and my goal is to have libs, core, extensions files (Like i managed to do in webpack 3). Therefore I've created 3 entry points which imports all my code (in order to bundle it). This is Part…
Raziza O
  • 1,560
  • 1
  • 17
  • 37
7
votes
1 answer

Webpack dynamic alias resolution

I'm looking for a way to pass in a function via the Webpack@3.12.0 config to help Webpack dynamically resolve an alias on compile-time. I have various third-party packages that import, for example, package-a/file-b. However, depending on which third…
Hiroki Osame
  • 295
  • 6
  • 16
7
votes
3 answers

Media Query not working with CSS/Style loader and Webpack3

I am using css-loader and style-loader for my CSS but all media queries are not working. I am using "webpack": "^3.4.1", "css-loader": "^0.28.4" and "style-loader": "^0.18.2". This is my Webpack configuration: const ExtractTextPlugin =…
7
votes
0 answers

Webpack 3 no scope hoisting and no fallback output with --display-optimization-bailout cli flag

upgraded to webpack 3 and using the ModuleConcatenationPlugin plugin (followed instructions webpack 3: Official Release!!). i'm not seeing any difference in a diff of my bundle with the plugin added vs without and still seeing all the function…
unclechett
  • 71
  • 2
6
votes
4 answers

How to change the src attribute of in .vue files with webpack and vue-loader?

I have a vue.js (version 2.4.4) application built with webpack (version 3.6.0) and vue-loader (version 13.0.5). In the .vue files, I need to modify the url contained in the src attribute of the tags according to the environment of my…
Baptiste
  • 325
  • 7
  • 13
6
votes
1 answer

How to use webpack DLL Plugin?

I am just starting to use webpack 3 and dllplugin. I managed to find a few blog articles abt. this. However none of them with a proper code sample/ GitHub samplecode. Does anyone know any references to sample code for this/ working example?
bier hier
  • 20,970
  • 42
  • 97
  • 166
6
votes
1 answer

How to build a less compilation chain (gulp -style) in Webpack v3?

For a new project I am bound to keep things webpack-only, and thus need to find a way to efficiently compile our stylesheets. Basically in a very gulh-ish way: gather all less-files including glob-patterns like src/**/*.less (css order may be…
Frank N
  • 9,625
  • 4
  • 80
  • 110
6
votes
1 answer

What is "multi" in Webpack's output?

Webpack is outputting something like [78] multi ./src/index.js 28 bytes {0} [built] What does the multi on this line mean?
trusktr
  • 44,284
  • 53
  • 191
  • 263
6
votes
1 answer

webpack.optimize.ModuleConcatenationPlugin is not a constructor

Getting the following error on Travis CI since upgrading to Webpack 3. It seems to work fine on my local environment, but when I commit to master and kick of Travis it keeps failing now with the following error. 21 06 2017 20:16:31.514:ERROR…
StevieB
  • 6,263
  • 38
  • 108
  • 193
5
votes
0 answers

is it possible to make sass-loader using dart-sass not node-sass

Because the node-sass have a big install problem and compatible problem, I do not want to use node-sass, prefer to use dart sass in my project. But when I use the sass-loader like this: "sass-loader": "7.0.0", shows that: ERROR in…
Dolphin
  • 29,069
  • 61
  • 260
  • 539
5
votes
2 answers

How to exclude a module from webpack, and instead import it using es6

I am currently using webpack to bundle up a javascript file with react. This file also has another import statement to another module within my project import { MyModule} from './MyModuleFile.js' Is there a way to exclude MyModule.js from the…
Cart
  • 63
  • 1
  • 1
  • 3
5
votes
0 answers

avoid redundant sass imports in webpack3 client bundle's

I am having a problem, that the common sass styles in my reactjs project end up redundantly in the client bundle… 1) I have a set of base styles: /src/frontend/sass/ base.scss the master file, which imports the following… ├ common.sass …
Frank N
  • 9,625
  • 4
  • 80
  • 110
5
votes
1 answer

Exclude scss files from karma

I want karma to completely ignore/not care/be completely oblivious to style files. I've got the following in my webpack config, which causes webpack to not import the files during build. plugins: [ new webpack.IgnorePlugin(/\.(less|scss)$/), //…
Jakob Jingleheimer
  • 30,952
  • 27
  • 76
  • 126
1
2
3
12 13