Questions tagged [webpack-config]
42 questions
12
votes
0 answers
What are the differences between `test`, `include`, `resource` attributes in webpack modules rules configuration?
In webpack.config.js to determine module we can use 3 different attributes:
...
module:{
rules: [
{
test: ... // the first one, commonly used in most example we can found on internet
include: ... // the second…

Sonny D
- 897
- 9
- 29
3
votes
0 answers
Removing runner settings from Task Runner Explorer webpack.config.js in Visual Studio 2019
In my Task Runner Explorer, There are too many runner settings(Run, Profile, Serve, Watch).
For each of the categories, there are 4 items, the one I actually use is the one before the last one of the Watch category. Is there a way to remove the rest…

Ran Marciano
- 1,431
- 5
- 13
- 30
3
votes
1 answer
Error: while using devtool="source-map" option in webpack config version 5
I am getting this error while using "source-map" as value to the devtool option in webpack configurations but while using "eval" it works (but I don't want "eval"). It could be a chance that asset can be undefined or not an array. I am new to…

hitendra
- 159
- 2
- 9
3
votes
1 answer
Webpack: Can't display SVG images with file-loader (svg parse error)
SVGs that I use using require doesn't get displayed.
In my terminal, svg assets gets emitted and paths were set properly in my html.
However, the SVG won't display while…

Julius Guevarra
- 690
- 1
- 7
- 19
3
votes
1 answer
Migrating postcss-loader from 3.0.0 to 4.0.2 results in Error: [object Object] is not a PostCSS plugin
So Today I have been trying to migrate postscss-loader from version 3.0.0 to 4.0.2
I noticed since verion 4.0.0 they added postCSS as a peer dependency so I've added postcss version 7.0.27. I did not go for 8 as I also use 'postcss-import' and this…

BonifatiusK
- 2,281
- 5
- 29
- 43
2
votes
0 answers
Webpack injecting wrong file names
Webpack is injecting script file names into my HTML file that are different from the names of the files it is actually generating.
I have a home page HTML file with these script tags: