kandi X-RAY | angular-webpack Summary
kandi X-RAY | angular-webpack Summary
angular-webpack
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of angular-webpack
angular-webpack Key Features
angular-webpack Examples and Code Snippets
Community Discussions
Trending Discussions on angular-webpack
QUESTION
Lazy module is eagerly loading, No separate chunks created for lazy modules
I created a repo to reproduce the issue
1.Clone https://github.com/sameerthekhans/lazy-load-angular-webpack-temp.git
2.npm i
3.npm start
4.Output - No chunk files created in dist
and the module is eagerly loaded in the browser
Additional Info
I used all the latest version of dependencies Angular - 11.1.1
, Webpack - 5
and So on...
*Also note I didn't used angular-router-loader
as @ngtools/webpack is used.
ANSWER
Answered 2021-Feb-04 at 10:17The main issue is that in your tsconfig you define module: "commonjs"
. commonjs doesn't respect dynamic import syntax. You need to change it to module: "ESNext"
for example that does.
QUESTION
I've been following some basic guides for getting Angular 5 running with Rails 5 and Webpacker but apparently there have been some recent changes that have thrown a wrench in things. For example, I'm following this guide to get a project set up from scratch.
https://github.com/amitai10/rails-angular-webpacker
Everything works great until you get to the section labelled "Using a different file for style"
When I restart my webpack-dev-server, the compilation fails with the error:
...ANSWER
Answered 2018-May-29 at 14:38Looks like some javascript in your scss file.
QUESTION
I have been using this seed project to as the basis for my new Angular 2 project. Unfortunately, it does not come configured to use scss, so I have to add that configuration myself.
I am using Angular Material so am importing a default theme in my app component like this:
...ANSWER
Answered 2017-Jan-07 at 00:19You are only passing the css
files, and not the scss
files, to to-string-loader
, so require('./material2-app-theme.scss') is not returning a string
Change the scss
loader to...
QUESTION
@angular ivy issue
Descriptionwhen i use the ng cli, it compiles the modules as esm2015, my problem is that i have an old system since angular 2 times and i use webpack, but for me it compiles to es5. how can i change it to compile to esm2015?
Minimal Reproductionmy tsconfig.aot.json:
...ANSWER
Answered 2019-Jul-26 at 14:15ok,i, found it, in webpack i had to set [ 'es2015', 'browser', 'module', 'main'],,
https://github.com/angular/angular/issues/31853#issuecomment-515406475
QUESTION
I have thoroughly followed the instructions in the following guides:
Get Started with ag-Grid in Your Angular Project
My app.module.ts
includes:
ANSWER
Answered 2019-Jun-04 at 22:11You should import the AgGridModule on each one of your 'entities' apps modules, not on your main apps.module.ts.
QUESTION
I have a snippet:
...ANSWER
Answered 2019-May-29 at 12:55Angular ivy no longer has any ngfactories.
instead of having to store metadata about the components in a separate file, the info is now stored as static fields on the component itself.
You should therefor refactor your code to not use ngfactory dependant thing such as importing ./module.ngfactory
QUESTION
I have MacOS High Sierra and my goal is to run node web-applications without installation node on macos (I wanna use docker to do it). That web-application is usually angular-webpack (compilation + run dev serwer).
Dockerfile:
...ANSWER
Answered 2018-Aug-08 at 14:54I think this issue might be related to the fact that you are specifying 127.0.0.1
as host. Try to use 0.0.0.0
instead:
QUESTION
I am trying to create a sample angular-webpack application instucted in https://angular.io/docs/ts/latest/guide/webpack.html but it is throwing me about 26 errors. Even after changing typescript version to "~2.2.1", these errors are coming.
can anyone help me to fix these errors please?
...ANSWER
Answered 2017-Apr-13 at 09:56The TSXXX errors seems definitely related to using a TypeScript prior to version 2.1 as explained for example here and here.
Please verify:
- the TypeScript version declared in you package.json file ("typescript": "~2.2.1" will be OK)
- the TypeScript version that you are effectively using to compile the project. You can verify that from the output of the npm start command. You should see something like this
[at-loader] Using typescript@2.0.10 from typescript and "tsconfig.json" from /usr/src/ng2-projects/angular-webpack/src/tsconfig.json
; thetypescript@
part will show the version used for compilation.
The TS2304 errors seems linked to a misconfiguration of the required type declarations. See here for a clear explanation of how configure them.
QUESTION
I am having an issue where Angular's DI only seems to work if I use the @Inject
decorator (i.e. @Inject(TestService)
) in the constructor of the component when injecting a service. This seems to work fine (without using @Inject
) whenever I use a standard Angular CLI test project, but when I create the same project without Angular CLI manually using webpack (as seen below), I always get:
Codecompiler.js:485 Uncaught Error: Can't resolve all parameters for AppComponent: (?).
./src/app/main.js
...ANSWER
Answered 2018-Jan-23 at 03:57Import core-js
inside your app.module.ts
which adds polyfills.
QUESTION
I've been struggling with getting my source-maps working in my app for quite a while. I have set
...ANSWER
Answered 2017-Nov-17 at 08:01I could fix your source maps for JS files, by adding the babel-loader. To do this, you need to install babel-loader:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install angular-webpack
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page