Questions tagged [webpack-4]
Use this tag for questions specific to features in Webpack 4. When using this tag, also include the more generic [webpack] tag where possible.
webpack-4
1,410
questions
0
votes
0
answers
19
views
How to build from webpack 4 to without breaking Content-Security-Policy of not using 'unsafe-eval'?
I'm trying to build through webpack 4 & npm . i facing issue of "EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the ...
0
votes
0
answers
22
views
Invalid hook call in react-redux provider
I am trying to migrate from Parcel 1.0 to Webpack 4, I am using React 16.14, Node: 18.20, Npm 10.7.
Getting below error when running webpack serve
Invalid hook call. Hooks can only be called inside of ...
0
votes
0
answers
14
views
webpack-dev-server serving chunks from root
I have a dynamic import. the chunk is generated.
My dev server starts on 9000, but I'm accessing the bundle through an HTML file that's served on localhost:3455 that looks like this:
<script type=&...
0
votes
0
answers
17
views
I'm trying to setup webpack to trace changes i make in src/index.js file to bring it in public/bundle.js
enter image description herethe course I've bought is from 2019 and the teacher uses older version of babel-loader, webpack, webpack-cli, and webpack-dev-server, i managed to make it kinda work but it ...
0
votes
0
answers
16
views
Webpack config + Add place holder output.publicpath
i want to access my site like this
http://local.xxxxxxxx.com:8080/courses/1406882/
to support above scenario how will set up the webpack config output.public path
currently i set up publicPath: '/...
0
votes
0
answers
26
views
Webpack config + set publicpath values for Path parameters
I have module like courses .
set the publicPath: "/courses/" but in my use case public path should be
courses/{courseid} ,course id is dynamic value.
I want access my site as follows
http://...
0
votes
0
answers
49
views
Terser Webpack Plugin Error - RangeError - Invalid String Error
We use webpack v4 that uses terser-webpack-plugin to generate a SSR build of a react application.
Our application build is generated in two phases:
Phase 1 - all static files [js, css] are generated
...
0
votes
0
answers
83
views
React-datepicker with react 18 and webpack 4.19.1 error
For my react app with react 18 and webpack 4.19.1, i see error when i try to use react-datepicker, i see an error like: o.isValid is not a function react-datepicker.min.js.
This is my component.tsx
...
1
vote
0
answers
81
views
React throwing TypeError: Cannot read property 'now' of undefined
I'm trying to update a legacy project to node 16, the project is a SSR react project with express.
Its using webpack 4..
The error just says: TypeError: Cannot read property 'now' of undefined
I dont ...
0
votes
1
answer
248
views
Hot reload not working on webpack 5.91.0 and webpack-dev-server 5.0.4
After updating webpack from version 4.46.0 to version 5.91.0, hot reload stopped working (not to be confused with live reload).
Previously, the hot loader worked thanks to the library @pmmmwh/react-...
0
votes
0
answers
98
views
Unable to create sprite svg file from multiple svg files using webpack
I want to generate a single sprite svg file from multiple svg files.would like to use webpack for it.am unable to get the sprite svg created whatsoever.
I have tried with webpack 5 first. but it didn'...
0
votes
0
answers
29
views
Content Security Policy for Embedded JS and dynamic scripts
I am using Webpack 4. I have included CSP headers in both the meta tag and web.config. Now, I want to add hashes for other inline scripts by removing ‘unsafe-inline’. However, when I run the code in ...
0
votes
1
answer
26
views
Webpack version 4 installation does not work
For my Vue project I need to use webpack, specifically version 4 in consideration with my other dependencies.
However, whenever I try to npm install webpack@4 --save-dev it just enters a loop that ...
0
votes
0
answers
31
views
Webpack 5 upgrade and module not found error
I am getting below error after updating webpack5 with respect to React module compilation.
With webpack 4 we were able to refer few node modules outside of sr/ folder using path.resolve and path.join. ...
0
votes
0
answers
52
views
Vue 2.7 + webpack: all variables inside debugger are undefined / null
We have a Vue 2.7 SPA at my workplace.
Nobody ever configured a dev build for it, nobody ever used a debugger (it's a docker-compose environment).
I'm currently implementing the dev build, and so far ...