yarsk | Do n't use this , use Create React App | Frontend Framework library
kandi X-RAY | yarsk Summary
kandi X-RAY | yarsk Summary
Don't use this, use Create React App
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 yarsk
yarsk Key Features
yarsk Examples and Code Snippets
Community Discussions
Trending Discussions on yarsk
QUESTION
Here are my dist files to reproduce yourself:
The breakdown:
- My dist build, with AOT and Lazy Loaded modules works fine when served with npm packages webpack-dev-server or live-server
- It is only when I copy dist to NGINX html directory and NGINX serves the files that I see Javascript errors in Firefox and Chrome
- I have tried many different webpack configurations.
- I am not importing my Lazy Loaded modules in any Typescript file
- With AOT compilation OFF my app and Lazy Modules serve fine from NGINX
- The TypeError: '' is not a function error is coming from Lazy Loaded Modules being served with NGINX
I am using the official Angular package @ngtools/webpack
to add AOT compilation to my Angular 5 app. This article explains how to use @ngtools/webpack
to add AOT to a Webpack build project. Very simple, though the article does not mention the needed step to add the Lazy Load module file paths to tsconfig-aot.json
. AOT fails with out that step.
All works great localhost with:
...ANSWER
Answered 2018-Jul-26 at 09:44It's because when you use AOT, the code is uglified with some funny UTF-8 symbols; ɵ
in i0.ɵcrt
in your case
You need to tell nginx to use UTF-8 charset
QUESTION
I am using @ngtools/webpack
as my Angular CLI for adding AOT Compilation to my Angular 5 app. As is no surprise to anyone, it has been a long journey for me already.
I have gotten AOT working in 3 environments, localhost, development and staging. Or course, deploying to production environment yesterday, I found my Webpack
build crashing.
I cannot achieve a meaningful error message though I do know for sure the source of issue is the @ngtools/webpack.AngularCompilerPlugin
.
My error message is hundreds of:
...ANSWER
Answered 2018-Aug-06 at 22:23I do believe that this error was caused because I had two versions of Webpack installed for my project. This would make sense from perspective that the error occurred in one environment and not others. Perhaps the npm dependency tree was different and an older version of Webpack was being used for some reason.
There was an npm package: webpack-rev-replace-plugin
that had a Webpack v1.5 dependency. I was using Webpack v4.16. Once I removed the webpack-rev-replace-plugin
and thus the older version of Webpack, I started getting a different error related to the uglifyjs-webpack-plugin
, once I removed the uglifyjs-webpack-plugin
and just used Webpacks defaults for minification etc, all was fine.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install yarsk
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