Questions tagged webpack

Explore the latest questions and answers asked by our top developers.

How can optimize application?

I am using angular 12 and webpack 5. When building a production version, the files weigh more than recommended limit. WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. Entrypoints: vendor (1 MiB) static/js/vendor.359496346b0a5a782f4a.js app (509 KiB) static/js/app.99781bb2b1b311146d5c.js What else can you […]

By user16591507
Categorized as angular, webpack Tagged ,

After updating Angular we get a "process is not defined"

We have updated our Angular 7 app to Angular 12 by using the migration steps from the angular website. The Angular CLI on npm start gives us only a warning ‘node-sass’ usage is deprecated and will be removed in a future major version. To opt-out of the deprecated behaviour and start using ‘sass’ uninstall ‘node-sass’. […]

By cpiock
Categorized as angular, typescript, webpack Tagged , ,

Import css cdn in sass file and extend class from it

I have exposed CSS classes as CDN to be imported into any scss file. The way i am importing the cdn into my scss file is using @import url(cdn_name) And in the same file, I have extended one of the classes that is in cdn. But the issue is that at build time the url […]

By Sahil Julka
Categorized as angular, css, sass, scss-lint, webpack Tagged , , , ,

Build angularjs with webpack And CDN pagekage

I am looking for a solution to reconfigure the webpack.config.js file. The problem is that I’m importing all the packages with CDN so when I minimize they don’t get some of the effects of bootstrap or jquery. const path = require(‘path’) const isDev = process.env.NODE_ENV === ‘development’ const webpack = require(‘webpack’) const ReactRefreshWebpackPlugin = require(‘@pmmmwh/react-refresh-webpack-plugin’) […]

By Quang Nguy n
Categorized as angularjs, build, external, webpack Tagged , , ,

Uncaught TypeError: __WEBPACK_IMPORTED_MODULE_0__angular_core__.OpaqueToken is not a constructor

I recently updated my angular project from 4->6 and it compiles but I get the error Uncaught TypeError: WEBPACK_IMPORTED_MODULE_0__angular_core.OpaqueToken is not a constructor at eval (webpack-internal:///200:5) at Object. (app.js:868) at webpack_require (polyfills.js:55) I did a global search for OpaqueToken but I cannot find it anywhere in my code. What do you think is causing this? […]

By Joey
Categorized as angular, package.json, webpack Tagged , ,

ERROR while ng build –prod "Cannot negate a statement"

I am using following command to build angular project (it has some bower components under assets folder): ./node_modules/.bin/ng build –prod –base-href /project And after running above command I am getting following error : ERROR in main-es2015.110a0182c67c95b8de43.js from Terser Error: Cannot negate a statement at AST_ClassExpression. (/node_modules/terser-webpack-plugin/node_modules/terser/dist/bundle.min.js:1:175355) at AST_ClassExpression.negate (/node_modules/terser-webpack-plugin/node_modules/terser/dist/bundle.min.js:1:176467) at /node_modules/terser-webpack-plugin/node_modules/terser/dist/bundle.min.js:1:200508 at AST_If.optimize (/node_modules/terser-webpack-plugin/node_modules/terser/dist/bundle.min.js:1:137605) at […]

By chandan vishwakarma
Categorized as angular, npm, terser, webpack Tagged , , ,

JHipster Angular clinet app intercepts every "http/https" request and then adds http://localhost

I am having this generated app with Node Jhipster, it is Angular on the frontend and NestJs on the backend. When I send an HTTP request to my server on AWS client app adds "localhost:4200" to API URL; Example: http://localhost:4200/ but what I want is just to be like this Source: Angular Questions

By Nemanja Jocic
Categorized as angular, interceptor, jhipster, webpack Tagged , , ,

Karma Webpack 5 throws "Module parse failed" when reading typescript

I had Karma + Jasmine tests running correctly with Angular 11 and Webpack 4. However, when trying to update Angular and Webpack to v12 and v5, I’m getting stuck on the following error when launching the tests: This is my Karma conf: module.exports = (config) => { config.set({ // … normal karma configuration // make […]

How to separate Angular components (zonejs) from your application

I’m not AG expert, I’m a sencha ExtJs expert. A super nice framework that has it all but is not that widespread and popular (due to various reasons) as AG is. So my company started to move pieces to Angular webcomponents using webpack to slowly make the huge app transition away from the less know, […]

Categorized as angular, extjs, webpack, zonejs Tagged , , ,

How to configure Webpack 5 with Angular 12 and without using Angular CLI?

How to setup an Angular 12 basic application, from scratch How to configure webpack 5 for development mode (Just-in-Time compilation) How to configure webpack 5 for production mode (Ahead-of-Time compilation) Source: AngularJS Questions

By Anup Khandelwal
Categorized as angularjs, webpack Tagged ,
1 32

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us