Questions tagged webpack

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

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 ,

How do I import a component from another app with Micro front end Architecture using webpack5 module federation?

I am trying to implement Webpack5 module-federation feature in angular. I have followed some tutorials and able to do it. All the tutorials I have followed has shown the process to import a module from remote project using decl.d.ts file on a route change. My current requirement is to show two remotes on a single […]

"Error: Module parse failed: Unexpected character" after upgrading to Angular 12

After upgrading Angular 10.2 to Angular 12, I am getting the following error: Error: Module parse failed: Unexpected character ‘�’ (1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See The problem is that I didn’t use webpack before and I don’t […]

1 2 3 44

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