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

While clicking on tab i need to load particular component in angular2

I am trying to load components in tab. while clicking on particular tab i need to load the particular component.But it's loading all component while navigating to that component. .html
Vignesh
  • 2,378
  • 3
  • 25
  • 48
5
votes
3 answers

TypeError: _enzyme2.default.configure is not a function

So recently, I migrated from React 15.4.2 to React 16.0.0. Here are my current versions in project: { "jest":{ "verbose":true, "automock":false, "testRegex":"\\.test\\.js$", "moduleNameMapper":{ …
5
votes
1 answer

Webpack 3 schema-utils error with no information

When running webpack I am getting the following: /Users/nikos/WebstormProjects/quantumjs/node_modules/schema-utils/dist/validateOptions.js:40 throw new _ValidationError2.default(ajv.errors, name); ^ false This is my config: var path =…
Nikos
  • 7,295
  • 7
  • 52
  • 88
5
votes
0 answers

TypeError: Object(...) is not a function first webpack runing

I try to run my application based on webpack and during first run I got error. Uncaught TypeError: Object(...) is not a function at Object. (main.js:75) at __webpack_require__ (main.js:20) at Object.defineProperty.value (main.js:63) at…
a.kozubenko
  • 1,030
  • 3
  • 15
  • 24
5
votes
4 answers

string replace loader not working with webpack 3

I am using webpack 3 & trying to use string replace loader. This code use to work in webpack1.X module: { loaders: [ { test: /fileName\.js$/, loader: 'string-replace', query: { search: 'jQuery', …
OpenStack
  • 5,048
  • 9
  • 34
  • 69
5
votes
1 answer

What do these Webpack v3 ModuleConcatenationPlugin bailout messages mean?

I get this output with Webpack 3, using ModuleConcatenationPlugin: [11] (webpack)/buildin/global.js 509 bytes {0} [built] ModuleConcatenation bailout: Module is not an ECMAScript module [54] multi ./src/index.js 28 bytes {0} [built] …
trusktr
  • 44,284
  • 53
  • 191
  • 263
5
votes
0 answers

Moving to Webpack

9 months ago I was struggling with Webpack One: [ Switching from Gulp to Webpack ] UPDATE 30.04.20 I have to update this because now everything is a different picture, everything, as you know, evolves very fast in the web programming world, with…
Locke
  • 629
  • 1
  • 5
  • 21
4
votes
0 answers

Avoid duplicate code in bundle on dynamic import of webpack

I have two lerna packages. Both have lodash as peer dependency. And, on the main webpack, I am importing the package dynamically on click of separate buttons. Separate chunk file is created for each package. However, each chunk file contains lodash…
Jinto
  • 847
  • 1
  • 11
  • 27
4
votes
2 answers

Wepback import html template not loading

I have a monolith project made with AngularJS using Webpack but I'm getting an error saying: Unexpected token < main.html. This error occurs when I have this line of code in one of my controllers: import templateUrl from './main.html'; From my…
Nizar B.
  • 3,098
  • 9
  • 38
  • 56
4
votes
1 answer

Module build failed: SyntaxError: Missing class properties transform when using webpack2

I am using React for my project and I was migrating from webpack2 to webpack3. After updating babel and all dependencies I executed npm run build which resulted in error: Module build failed: SyntaxError: Missing class properties transform. Examples…
jureispro
  • 1,342
  • 5
  • 22
  • 43
4
votes
1 answer

import html template in typescript

I'm trying to import my html template so that webpack will recognize them and include them when I build. (webpack -d) According to this GitHub issue I should do this declare module '*.html' { const _: string; export default _; } Then import…
Snæbjørn
  • 10,322
  • 14
  • 65
  • 124
4
votes
1 answer

Error: DllPlugin: supply an Array as entry

I have a project developed starting from this repository. I wasn't on top of updating my app with their updates which is what I should have done but I would update libraries depending on my need for a new version. I updated my app about two weeks…
Kafo
  • 3,568
  • 1
  • 12
  • 19
4
votes
1 answer

What does "Module {path}\src\app\sales\models\index.ts has no static exports" mean and how do I fix it?

We've just added webpack 3.0.0 to our angular 2 project. I had it working, got about a 20-25% performance improvement and a 50% (ish) decrease in size. I then rebased this onto the main branch and started to get the error. ERROR in chunk main…
baralong
  • 1,644
  • 1
  • 16
  • 32
3
votes
1 answer

Webpack: How to migrate CommonsChunkPlugin (wp3) to optimization.splitChunks (wp4)?

I'm trying to migrate to webpack4 from 3 and I'm having a really hard time migrating CommonsChunkPlugin. On WP3, I have the following simplified configuration: const entries = { client: './src/index.js', common1: ['lodash'], common2: ['react',…
fabiomcosta
  • 1,105
  • 1
  • 8
  • 10
3
votes
1 answer

generate JSON file during Webpack build

I'm using Webpack to build my assets for Chrome Extension. Usually in the /dist you should have some JS files, some HTML files, and manifest.json Previously I had this file created somewhere and using 'copy-webpack-plugin' I simply copied that to…
Ivan
  • 852
  • 1
  • 12
  • 29
1 2
3
12 13