webpack-4 Questions

4

Solved

I have this little app that works fine in development mode with webpack-dev-server, but when I use the bundled files from the dist folder generated by the production mode, all I get in the browser ...
Jea asked 27/4, 2019 at 14:38

5

Solved

I am taking a course on Udemy (it is Brad Schiff's React for the Rest of Us course here) that is based on React and I am receiving an error related to webpack which is keeping it from compiling. I ...
Dudleyduds asked 18/2, 2021 at 7:41

3

Solved

I have a webpack project with this in my "main.ts" module: import {Elm} from "./MainModule"; it fails with: TS2307: Cannot find module './MainModule'. but when I switch my "tsconfig.json" fro...
Descent asked 16/12, 2018 at 15:16

3

Solved

I'm currently struggling with rewriting the proxy path to the api server. In my setup what I do is for api request, I delegate it to the proxy server and only for js/html/css webpack-dev-server is...

9

Solved

I have a function that takes some arguments and renders an SVG. I want to dynamically import that svg based on the name passed to the function. It looks like this: import React from 'react'; expor...
Gorlicki asked 21/4, 2020 at 8:37

3

Solved

Using CopyWebpackPlugin, I am not able to ignore a specific folder or a specific file. It copies everything. What I have done in the webpack.config.js: new CopyWebpackPlugin([ { from: 'src/ass...
Sandisandidge asked 19/6, 2019 at 14:36

16

Solved

I was trying to run webpack-4 first time webpack ./src/js/app.js ./dist/app.bundle.js it shows warning / error : WARNING in configuration The 'mode' option has not been set, webpack will fallb...
Dhole asked 11/4, 2018 at 10:36

6

Solved

Story I'm developing the AWS Lambda functions and compile the code using webpack. I've read some of the articles and it seems that the process.env variables are auto replaced during compilation. ...
Figurine asked 16/12, 2018 at 11:39

1

Solved

Earlier in webpack version 4 and node 14 version, runtimeChunkName was with pre-comipled chunk filepath, but now this is not working in webpack 5. const beforeRenderPath = before-render/js/dist/Bef...
Anvil asked 10/8, 2023 at 13:34

4

I had working jasmine tests with webpack 3. Now I try to use it with webpack 4 but have some problem with it. Firstly I had problem with spyOn function. Error: : myFunction is not declared writ...
Charis asked 14/11, 2019 at 8:40

2

Solved

i have a problem at run build production in webpack. but when i run using dev-server, more code can't get error. please help.. I have to finish my last project and it must run with good at producti...
Applewhite asked 25/5, 2020 at 13:43

5

I upgraded babel 6.x → 7.x but having issues running Webpack. It is complaining about missing core-js/modules/*. My babel.config.js is in the root directory. I converted the previously existing...
Winshell asked 18/4, 2019 at 14:29

4

Solved

Project directory structure. Below are the webpack configuration files. webpack.config.client.js const path = require('path'); const webpack = require('webpack'); const CURRENT_WORKING_DIR = p...
Invariant asked 11/4, 2021 at 5:55

2

Solved

I recently upgraded from Webpack 2 to 4. Webpack compiles, and most of the application works fine. It seems to of broken part of the application. I receive the error NullInjectorError: No provide...
Mazur asked 16/4, 2018 at 22:34

3

When trying to import a component from a private library which exports Typescript, we get the following error message: Module parse failed: Unexpected token (82:7) You may need an appropriate loade...
Eradicate asked 24/11, 2020 at 15:26

6

Can't seem to find any debug option or plugin in webpack to show what exactly went into a chunk. Why do I need this? I've noticed cases where code splitting literally makes everything much larger...
Soleure asked 30/4, 2015 at 11:19

2

Solved

I extracted css using extract-text-webpack-plugin in webpack 4. The CSS is exctacted but when i run npm run build , the css is extracted but i get a message on screen saying Entrypoint undefined ...

4

Solved

When I am trying to import dynamically vue components using this code: const components = require.context('./', true, '/^index\.js$/'); I am getting this error: app.js:9 Uncaught TypeError: __w...
Firsthand asked 18/6, 2019 at 8:30

14

Solved

When I try to import SVG Image then the following error shows. Which loader I have to use for importing SVG images? ./static/Rolling-1s-200px.svg 1:0 Module parse failed: Unexpected token (1:0) Yo...
Wilde asked 15/3, 2019 at 4:13

2

We've been using UglifyJS and webpack v4 for our react code, but then just updated to webpack v5. It appears that UglifyJS does not work with webpack v5. Is there an alternative? We need something ...
Opec asked 15/12, 2020 at 1:9

2

Solved

I'm getting the error in the title when trying to build the following webpack file: const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackI...
Piselli asked 26/2, 2020 at 22:12

2

Solved

The problem I have a project using Webpack 4 and want to enable code splitting. I have this config to enable split chunks. optimization: { splitChunks: { chunks: 'all' }, } When I run the ...
Armentrout asked 13/7, 2018 at 0:6

8

this is my first time writing here so please bear that in mind. I'm first time using webpack in a project and I have a problem where I'm trying to set a background image using background url() func...
Undertrump asked 13/8, 2019 at 18:5

3

I'm looking for a clear explanation of the difference between these two options in webpack. I've read the description here but the difference is not clear. Quoting the description: Setting the o...
Atavism asked 2/5, 2018 at 4:29

7

Solved

I 've put together a very simple React / Leaflet demo but the marker icon is not showing at all. Full running code is here. Here's what I have in my componentDidMount method: componentDidMount() ...
Doubletalk asked 11/2, 2020 at 17:7

© 2022 - 2025 — McMap. All rights reserved.