-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Can't apply custom loader for component's 'templateUrl' since version 8 #14534
Comments
Hi, are you using |
How can I pass I have tried this configuration with meltedspark/custom-webpack, but no success
|
Modification of the Webpack configuration is considered unsupported. However, one method that may work to alter the options of a plugin is to search for the existing instance within |
For testing purposes I have altered |
Here is a workaround based on meltedspark/custom-webpack for now:
|
Closing as the above method is a necessary step to augment an existing plugin within a webpack configuration. |
Almost all property of AngularCompilerPlugin is editable trough tsconfig or angular.json. I think There are lot of feature request for PUG/JADE support. Since 2016 we got promises for native support #40 (PR not merged) or trough addon system #1886 Now in Angular 8 it's even more difficult... |
It's more general than that though. Any webpack plugin would need the same treatment to augment (TerserPlugin, SourceMapDevToolPlugin, SubresourceIntegrityPlugin, etc.). The option in question is also only relevant with a custom webpack configuration which while allowed is also unsupported (from within the CLI). |
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. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was: ^7
Description
In previous versions there was an error if you tried to use any unsupported filetype for templateUrl
Since .svg is supported there are no error, but the file is simply loaded with
raw-loader
🔬 Minimal Reproduction
Create a new project with Angular: 8.0.0-rc.5
Try to use ng-cli-pug-loader or custom-webpack builder for .pug loading.
🌍 Your Environment
Anything else relevant?
The issue is present since .svg component template is supported - dfb08b9
#danguilherme/ng-cli-pug-loader#20
The text was updated successfully, but these errors were encountered: