Questions tagged [webpack.config.js]
76 questions
55
votes
5 answers
No PostCSS config found
I am trying to learn reactjs according to a tutorial. Meanwhile the tutorial instructs to use webpack for compiling stylesheets and JS assets. I am stuck in an error where the stylesheets cannot get compiled and throws following error while…

Birendra Gurung
- 2,168
- 2
- 16
- 29
11
votes
1 answer
HookWebpackError: Not supported when copy-webpack-plugin is used on Windows
I'm running into an error on Windows 10 whenever I try to run webpack, it works fine on macOS.
This is the error
[webpack-cli] HookWebpackError: Not supported
It runs fine without "CopyPlugin", but I would like to copy img folder into dist folder.…

danilab
- 113
- 1
- 1
- 6
8
votes
3 answers
Difference between Angular-cli.json , webpack.conf & tsconfig.json
I am building an angular4/typescript desktop app & confused in-between
angular-cli.json
tsconfig.json
webpack.conf.js
Can someone please explain main conceptual differences in above 3 configurtation files & what are they for?
Do I have to define…

Maverick09
- 1,067
- 1
- 11
- 21
6
votes
3 answers
How to use fallback: { 'path': require.resolve('path-browserify'), in webpack?
I'm getting this error:
If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }' - install 'path-browserify' :
(base) raphy@pc:~/NEW-Raphy-Template$ yarn start
yarn run…

Raphael10
- 2,508
- 7
- 22
- 50
5
votes
1 answer
Webpack 4 configuring entry points and outputs (dist folder generated in each project folder)
The case is to have main folder 'Projects' and installed there all webpack 4 files with configs. Inside the 'Projects' folder are many folders like 'Project1', 'Project2', etc...I want to start from 'node_modules' entry point where webpack.config.js…

PawełG
- 83
- 1
- 7
4
votes
0 answers
webpack < 5 used to include polyfills for node.js core modules by default
I am beginner to react js. Please someone provide input for below issue.
In local system react js application is working fine but when i am generating build from Jenkins compilation is failing and its throwing below error.
Module not found: Error:…

Akshay Barodia
- 486
- 4
- 11
4
votes
1 answer
Webpack can't find import needed for Typescript type resolution. How to fix this?
My project uses typescript and built with webpack.
I have a typings file that comes from a third part lib located under node_modules/@types/libname/custom.d.ts. That file has a namespace declaration with a few types in it:
declare namespace…

Edy Bourne
- 5,679
- 13
- 53
- 101
4
votes
2 answers
Mini-css-extract-plugin - how grap the hash naming on index.html
I try currently to implement mini-css-extract-plugin.
I fail to implement hash naming, when I use it I don't know how lead my index.html file to grap the specific name on the fly.
If someone has any idea would be great.Thanks
Here my…

HoCo_
- 1,302
- 4
- 16
- 33
3
votes
0 answers
npm run dev won't auto refresh with latest changes
I have an vue.js application that won't auto refresh when I run 'npm run dev' - the application will only update when I run 'npm run build'.
The application will start when I run npm run dev but it just doesn't have the latest changes until I do a…

user217nat
- 31
- 2
3
votes
0 answers
Nativescript vue webpack configaration missing
I;m beginner to nativescript-vue. When i initiate my project with following command tns run android it will occur below error
The webpack configuration file /home/camilus/laravel/vue-native/drawer/webpack.config.js does not exist. Ensure you have…

NIroshan Fernando
- 51
- 2
2
votes
0 answers
Webpack with yarn react tailwind, yarn build won't load css files
I am using webpack, yarn, react from scratch, and tailwind.
In dev mode everything works, but in production mode my app won't load tailwind css styles at all.
I can't get the scripts to work in my package.json file, and I think that my…

Milenija Jovicic
- 21
- 2
2
votes
1 answer
How to export the configuration of `webpack.config.js` using pure ESM?
I'm trying to convert into pure ESM the webpack.config.js
import path from 'path'
import {fileURLToPath} from 'url'
import HtmlWebpackPlugin from 'html-webpack-plugin'
import CopyPlugin from 'copy-webpack-plugin'
import MiniCssExtractPlugin from…

Raphael10
- 2,508
- 7
- 22
- 50
2
votes
2 answers
Webpack external module in microfrontend/ multirepos angular gives an error on build
I have created a Angular project to call the microfrontend from other running angular project. I have import the module in my app by using webpack.config.js.
It is working well locally but failed on production build.
When I run ng build it throws…

Ashif Sayyad
- 31
- 3
2
votes
1 answer
Alias the package in your webpack config: react native web maps ; react native maps
I need to use react native web maps in react native project ,
i'm using expo and need to alias package in my webpack.config.js
i want to use both ios/web version for my map.
I m fairly new to programming
link to library i m…

Sahaj Arya
- 61
- 6
2
votes
0 answers
Webpack 4 devServer not refreshing browser
I'm using Webpack 4 in a Multi Page Application.
When in development mode:
Each page have some common third-party libraries (loaded via