Questions tagged [webpack-plugin]

A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows to load parts for the application on demand. Through "loaders" modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.

132 questions
0
votes
1 answer

jQuery loaded with ProvidePlugin in Webpack 2 does't work after route change

I am working in Angular4 and I am using Webpack setup for building the app. I want to use jQuery in my project so I googled it and found about the ProviderPlugin that is offered by Webpack to globally load modules. However, the issue I am facing is…
Abhilash Rathod
  • 563
  • 6
  • 11
0
votes
1 answer

ReferenceError: process is not define with libraryTarget: umd

With webpack.config.js devtool: false, entry: ['babel-polyfill', './src/index.js'], output: { path: join(__dirname, 'lib'), filename: '[name].js', library: 'mylib', libraryTarget: 'umd', umdNamedDefine: true, …
ridermansb
  • 10,779
  • 24
  • 115
  • 226
0
votes
1 answer

TypeError: SuppressChunksPlugin is not a constructor, how to overcome this is a webpack?

new SuppressChunksPlugin([ ^ TypeError: SuppressChunksPlugin is not a constructor at Object. (/Users/rohit/WebstormProjects/myProjectStructure/webpack.config.js:80:9) at Module._compile (module.js:570:32) at…
0
votes
0 answers

how to add preprocess loader in webpack 2

I am trying to add preprocess loader in my webpack 3. I have installed it successfully. but it is not working here's my webconfing file var debug = process.env.NODE_ENV !== "production"; var webpack = require('webpack'); var path =…
LowCool
  • 1,187
  • 5
  • 25
  • 51
0
votes
0 answers

Webpack setup to allow LESS overrides to take effect in imported NPM modules

I'm working on an app that is bundled using webpack. The app is built out of a number of NPM modules hosted in a private NPM registry. Some of these modules import LESS variables from Bootstrap: // my-module-stylesheet.less @import (reference)…
Nathan Friend
  • 12,155
  • 10
  • 75
  • 125
0
votes
1 answer

webpack2 i18n-plugin How to decide the bundle to load

I have a working webpack config which can generate i18n bundles. I am using i18n-webpack-plugin. My website is a static website. I can see the bundles generated as [language].[name].bundle.js. eg: "de.login.bundle.js", "en.login.bundle.js". Now in…
Manish
  • 146
  • 4
  • 12
0
votes
1 answer

How to parse svgs with unquoted attributes in `svgo`?

When parsing using svgo or as part of webpack loader (svgo-loader) or plugin (imagemin) that both use svgo, if you have svgs with unquoted attributes such as: xmlns="http://www.w3.org/2000/svg" width=20px height=20px The error: Error in parsing…
Vitali Zaidman
  • 899
  • 1
  • 9
  • 24
0
votes
1 answer

webpack.DefinePlugin is not recognized and devtool: 'cheap-module-source-map does not work

I am trying to reduce the size of react project for production by following this article http://moduscreate.com/optimizing-react-es6-webpack-production-build/. Unfortunately, some of the steps do not work. One of them is webpack.DefinePlugin, in…
Feruza
  • 954
  • 4
  • 15
  • 29
0
votes
0 answers

ExtractTextPlugin is working for single file but not on a directory

Im new to webpack and I've been trying to setup a working environment. But when I tried to separate the css and js files I came across this issue. The extract-text-webpack-plugin is not working as intented. My directory structure is as…
John Peter
  • 441
  • 2
  • 13
0
votes
1 answer

Loading dynamic image in webpack

I am using Angular with Webpack (with loaders like file-loader, url-loader etc.) Now, I want to load image which is being served through http. The build was successful, when I used require('./imgs/profile.png') But when I used tried say E.g.…
0
votes
1 answer

Automatically require (or copy) all images that are referenced in HTML using Webpack

I just started to use Webpack with an Angular 1.x application, I have a working solution but rather than require my images (which would force them to be copied to the build directory) I was hoping to automatically parse the html and require all IMG…
Martin
  • 23,844
  • 55
  • 201
  • 327
-1
votes
2 answers

Run webpack plugin through angular CLI

how to run webpack plugin via CLI? I found something like that, but this is not what I need. npx webpack plugin
whiteboss
  • 1
  • 1
1 2 3
8
9