Skip to content

Raw file imports in the Esbuild builder #26445

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

Closed
santam85 opened this issue Nov 21, 2023 · 2 comments
Closed

Raw file imports in the Esbuild builder #26445

santam85 opened this issue Nov 21, 2023 · 2 comments

Comments

@santam85
Copy link

santam85 commented Nov 21, 2023

Command

build, serve

Description

With the webpack builder I was able to do raw imports by using
require('!!rawloader!./somefile.ts').default
Seems I should be able to to the same with devkit/build-angular:application too, by configuring a plugin in the options, but could not achieve it. Vilte seems to support it by appending ?raw to the file path.

Describe the solution you'd like

Would be great to be able to useimport('raw!./somefile.ts') or similar.

Describe alternatives you've considered

I checked the loader option on the workspace config, but could not make it work for ts or html files. There seems to be an internal option to load plugins in the builder, but that's not accessible as a configuration option.

@alan-agius4
Copy link
Collaborator

Duplicate of #26368

@alan-agius4 alan-agius4 marked this as a duplicate of #26368 Nov 21, 2023
@alan-agius4 alan-agius4 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2023
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants