Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notes on Upgrading to Angular 8 #66

Closed
chriszrc opened this issue Apr 26, 2019 · 1 comment
Closed

Notes on Upgrading to Angular 8 #66

chriszrc opened this issue Apr 26, 2019 · 1 comment

Comments

@chriszrc
Copy link

I'm submitting a...


[ ] Regression 
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

Everything works with Angular 7, but if you upgrade your cli and then upgrade the angular universal app:

npm install -g @angular/cli@next
ng update @angular/cli @angular/core codelyzer --next

A couple of problems appear:

  1. Angular complains about the lazy loading of modules unless you change the "compilerOptions"->"module":"esNext" in the tsconfig.app.json file
  2. If you try the SSR build, you get the error already reported here - Module not found: Error: Can't resolve 'string-replace-loader' in... #64
  3. The SSR build fails, because the ng-universal/webpack-config.factory.js has this section:
test: /\module.ts$/,
                        loader: 'string-replace-loader',
                        options: {
                            search: '../server/main',
                            replace: '../dist/server/main',
                            flags: 'g'
                        }

and apparently in the latest version of string-replace-loader, including any flags in the options turns on regex, and because the periods are in there unescaped, it totally messes the replacement-

Expected behavior

Should work with Angular 8 :)

Minimal reproduction of the problem with instructions

See above

What is the motivation / use case for changing the behavior?

Getting ready for Angular 8!

Environment


Nest version: 6.0.1

 
For Tooling issues:
- Node version: 10.15.3  
- Platform:  Mac

Others:

@chriszrc
Copy link
Author

Moved to here - TrilonIO/universal-nest#18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant