-
Notifications
You must be signed in to change notification settings - Fork 12k
require html stopped working in upgrade to angular 8 #14855
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
Comments
thanks @alan-agius4 ! |
I would say "by some angularjs applications" is an understatement, unless there's another clean way to have html files imported? |
Hi, can you kindly explain why you cannot use Thanks. |
I get the following error at runtime: |
Furthermore, the require way was working before, but not anymore... |
Hi @alan-agius4, this won't work with As a temporary workaround I've added this package to the project and replaced all |
For me using |
That works (for now) for me as well. |
To circumvent this bug, if you have a lot of imports/requires, instead of changing them all, you could also use ngx-build-plus and add webpack.partial.js:
|
Hi all, we had a chat around this, and we think that if you want to use webpack specific stuff you can use ngx-build-plus or otherwise you can update the require statements to include the raw-loader import syntax ie: Note: Webpack specific features might not work in the future. We apologies for any inconvenience this might cause. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was: 7.x
Description
When trying to require an html file in using @angular/cli 8 it fails, it works in angular 7
🔬 Minimal Reproduction
I made repro branches. Be sure to npm install when switching between branches.
ng 7 generated project with node types added
https://github.com/icorne/ng-import-html/tree/ng7-import-html
same project, upgraded with ng update @angular/cli @angular/core
https://github.com/icorne/ng-import-html/tree/ng8-import-html
🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
This is import for me because i'm using a hybrid project angular/angularJs, and for this to work, you cannot use templateUrl
The text was updated successfully, but these errors were encountered: