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 #18

Closed
chriszrc opened this issue Apr 29, 2019 · 5 comments
Closed

Notes on Upgrading to Angular 8 #18

chriszrc opened this issue Apr 29, 2019 · 5 comments

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... nestjs/ng-universal#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:

@kamilmysliwiec
Copy link
Member

Thanks for sharing your experiences. Once Angular 8 is officially published, I'll update an example.

@michaeljota
Copy link

michaeljota commented Jun 7, 2019

@kamilmysliwiec Now that Angular 8 was officially released, can we expect this to work? Looking forward to it. Thanks!

@marcellkiss
Copy link

I just started a new project with the latest ng cli (v8), would be happy to use universal-nest

@marcellkiss
Copy link

*despite the warnings, v1.1.1 seems to work fine with angular 8.x

@kamilmysliwiec
Copy link
Member

Repo updated :)

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

No branches or pull requests

4 participants