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

Cannot use bluebird Promise IE11 webpack

I'm making an web app by using webpack, angularjs and bluebird. I put this in my code: { "plugins":[ { new webpack.ProvidePlugin({Promise: 'bluebird'}) } ] } But in developer console. Promise doesn't appear as a global variable.…
Redplane
  • 2,971
  • 4
  • 30
  • 59
1
vote
1 answer

Vue 2 Webpack 3 Bootstrap 4 scss customization

In my vue 2 application, wanted to define media breakpoint like below @include media-breakpoint-between(md, lg){ body { background-color: red; } } and hence forth imported in the vue file bootstrap.scss @import…
Sridhanya
  • 31
  • 2
1
vote
1 answer

how to use webpack for html5 srcset images

In development mode i am using require for html images and compiling using webpack. Html: Below code is compiled using webpack and return output as normal html but how to use it for html5 srcset 2x 3x images?
Pushparaj
  • 1,072
  • 8
  • 29
1
vote
0 answers

Migrating from Grunt+Bower to Webpack

I am trying to migrate away from Bower+Grunt to Webpack (and eventually to YARN instead of Bower). However, any documentation I have come across for WebPack3 doesn't even talk about handling bower components. WebPack 2 used a plugin for Bower,…
swateek
  • 6,735
  • 8
  • 34
  • 48
1
vote
1 answer

CSS Modules, SASS + Webpack3 + React

I am struggling with setting up my webpack config properly... I tried many things without result. When I am trying to compile bundle I receive loads of errors regarding path to .svg files however the path is ok. > ERROR in…
Rachomir
  • 280
  • 1
  • 5
  • 16
1
vote
0 answers

Babel6 not transform class definitions with Angular 5, Webpack 3.8.1

Why babel does not transform my classes? Syntax error main.js (24,25) IMAGE: IE11 transformed main.js file Maybe my configuration is not right? I try to add support of IE 11 by my app, but babel not work correctly. I had also added polyfills.ts from…
1
vote
0 answers

HandlebarsIntl intergration with webpack 3

I wish to use Handlebars Intl for my handlebar templates but it will throw an error 'helpers.formatNumber is undefined' while using. This is my web pack configuration { test: /\.tpl$/, include: [ …
Dhanan
  • 207
  • 4
  • 12
1
vote
1 answer

Vue component files have syntax errors on build only on Windows

Locally I have my Vue project working perfectly (OSX, Node 9.3, npm 5.6). However when I push to the build environment (Windows NT 6.3.9600, npm 3.10.8, node v4.5.0) my builds fail and I have syntax errors in my .vue files. I'm using the boilerplate…
danhere
  • 680
  • 1
  • 8
  • 21
1
vote
0 answers

webpack3 + css loader - setting absolute path aliases for relative font and image imports in css files

I want to alias the the relative font and image imports in my css and scss modules with absolute paths. The goal is store all of my font and image files in two central folders, without going through every css file and changing the relative imports,…
1
vote
1 answer

Why doesn't the bundle.js get loaded on other routes?

I load my bundle.js and output as below using webpack3 in a webpack.common.js file. This works fine when I hit the '/' route with a React front end. My React router works fine and navigates around the app as expected changing the urls as needed.…
Jason Allshorn
  • 1,625
  • 1
  • 18
  • 27
1
vote
1 answer

Including html files using ngInclude

I'm trying to include an html file in to another html using ng-include. Followed this with no luck, maybe due to webpack version differences. 404 errors trying to find the file in the ng-include package.json "devDependencies": { ..//other…
1
vote
1 answer

How to jsHint two different folders with Webpack?

In short, I need to jshint tests specifications in parallel with the package sources during the build process. Using the Webpack 3, how to make jshint-loader to watch out for two different folders with two different .jshintrc files? One pack of…
khajjit
  • 43
  • 1
  • 6
1
vote
0 answers

cannot debug Webpack 3 index.ts with node-ts in vscode

I am using vs code and I am trying to debug my index.ts file and I am building my ts files with ts-node. My issue is when I start debugging I get an error because of my index.ts file contains import './index.scss'; the error is $mainColor:…
1
vote
1 answer

Prettier SCSS webpack-3

I'm trying to have my scss run through prettier but always get errors. I'm using the prettier-webpack-loader (also tried with prettier-webpack-plugin). When I run it, it seems to want to process the .scss files as javascript. One of my js files…
Mathew Berg
  • 28,625
  • 11
  • 69
  • 90
1
vote
2 answers

How come, Webpack directly imports webpack.config.babel.js?

I am new on a pretty big ReactJS project. On top level, it does not have the usual webpack.config.js, but only a `webpack.config.babel.js'. That this one does indeed get used I can verify, when running > webpack gets called (through npm run with…
Frank N
  • 9,625
  • 4
  • 80
  • 110