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

WebPack + SASS : How to generate relative image path?

I am trying to set up a web application behind an Apache vhost which acts as proxy (proxyPass) in order to add a contextPath. Only the vhost has to know this contextPath of course. Everything is ok, except the background-images which are not loaded.…
2
votes
1 answer

Webpack migration (1.13 -> 3.5)

I am trying to update my webpack conf from v1.13 to 3.5 but i cannot and i do not know what is wrong, i have been following this link (https://webpack.js.org/guides/migrating/) but i still have errors webpack.server.js var fs = require('fs'); var…
ayxos
  • 408
  • 1
  • 7
  • 15
2
votes
0 answers

Updating WebPack 1 to WebPack 3

I really like the concept behind this boilerplate of separating the frontend from the backend. I am trying to update the whole boilerplate starting from WebPack. The version included in the boilerplate is WebPack 1. I tried upgrading it to version…
Anas Tiour
  • 1,344
  • 3
  • 17
  • 33
2
votes
1 answer

Webpack --watch doesn't trigger for CSS files in specific directory

Using webpack --watch, changes to .pcss (PostCSS) files are not picked up when within [src/components/Main/]. Changes to .js files are picked up fine as well as .pcss files in other directories. Because my web app is isomorphic, ExtractTextPlugin is…
donut
  • 9,427
  • 5
  • 36
  • 53
2
votes
1 answer

Webpack bundle importing empty dependency objects

I'm trying to build a "component library" using React and Webpack (3.4.1). The idea is to have one React app, using React Cosmos, to interactively build and explore a "library" of reusable components. That repo will also have a build task, which…
Sasha
  • 6,224
  • 10
  • 55
  • 102
2
votes
0 answers

How can I import dynamically scripts without bundle them together?

I'm trying to dynamically import a script with webpack's magic comments ( using commons chunk plugin ) depending on the some user action. I've tried this ( lets say that the user's action would load the 'a' script ): const paths = { a:…
2
votes
1 answer

How to load an index.html file with Webpack 3, Typescript and file-loader?

I try to load my index.html file via the file-loader and Webpack 3. My webpack.config.tslooks like this: import * as webpack from 'webpack'; const config: webpack.Configuration = { entry: "./src/app.tsx", output: { filename:…
Robin
  • 8,162
  • 7
  • 56
  • 101
1
vote
1 answer

Why does VS Code consider an import valid but WebPack does not?

I am pretty sure it is all about the version of WebPack I use ("webpack-cli": "3.3.11") but I want to be sure I am right before going on another journey of debugging for upgrading WebPack (I tried to upgrade it to 5 but it does not work without a…
1
vote
0 answers

monaco editor with webpack 3 - unexpected token {

I'm trying to use monaco-editor in my project that uses webpack v3 (I can't update it for the moment). When trying to use it with monaco-editor-webpack-plugin I get the following error: Uncaught SyntaxError: Unexpected token { at…
Elad Katz
  • 7,483
  • 5
  • 35
  • 66
1
vote
0 answers

extract-text-webpack-plugin doesn't load css in dynamically loaded chunks

I'm working on a multi-entry web app & building with webpack 3, with using extract-text-webpack-plugin to separate entries' css in separate files. Currently, I'm trying to load some modules dynamically along with their own css to enhance…
AbdelHady
  • 9,334
  • 8
  • 56
  • 83
1
vote
1 answer

Migrating RequireJS/AMD with Plugins to Webpack

I'm working on migrating a large RequireJS application to Webpack. The basic build with Webpack seems to work fine -- I've moved "paths" definitions to "alias" and I've setup loaders for my content and shims, like jQuery. However, there's a…
RoboBear
  • 5,434
  • 2
  • 33
  • 40
1
vote
2 answers

Webpack externals doesn't seem to work for nested objects.

I was using my webpack externals like this and it works fine. externals: { react: { root: React } } But now I am injecting the webpack script for a child window , so instead of Window , React is now available in window.parent. So…
Abhik
  • 1,920
  • 7
  • 27
  • 50
1
vote
1 answer

how add a jquery plugin to webpack in a jhipster project

I can not add a jquery library to my jhipster project, I think it's specific to webpack, here is an exemple with fullcalendar, but i have the same probleme with all jquery plugin all is in src/main/webapp/app/layouts/main/main.component.ts &…
Brynnlow
  • 36
  • 4
1
vote
1 answer

Vue.js webpack sass-loader issue with my .scss file

I am using style-loader, node-sass, sass-loader packages as stated in the doc.. I added to my webpack.base.conf.js the following modules rules { test: /\.(s?)css$/, use: ['style-loader','css-loader','sass-loader'] }, In my main.js , I…
user762579
1
vote
1 answer

I can't get Firebase to work on my React project

I am trying to get firebase to work on my React project (using Webpack v3), but I am having some issues. I added "firebase": "^4.10.1" to my package.json and in a firebase.js file I added this: import * as firebase from 'firebase'; const config =…
lokilindo
  • 682
  • 5
  • 17