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

Issue while using dynamic template like './abc.component.html!text' #481

Open
ravituvar opened this issue Jul 19, 2021 · 1 comment
Open

Comments

@ravituvar
Copy link

We are gettting Cannot find module './abc.component.html' when used in following fashion..

import template from './abc.component.html!text';
@component({
selector: 'abc-comp',
template: template
})

Note: We have a custom bundling that includes above syntax to include html in a bundled code.. Also we have a dependency of SystemJs in our project.

Any idea on this error?

@thw0rted
Copy link

thw0rted commented Aug 18, 2021

The module specifier you used (./abc.component.html!text) was never a "real" specifier, that's a syntax specific to Webpack's loader chain. You may have to wire up your custom bundler to the build process using a custom Transform. (Wouldn't it be simpler to just use @Component({template: "./abc.component.html"}) and reconfigure your bundler's loader rules instead?)

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

2 participants