Description
openedon Dec 4, 2023
Command
build, serve
Description
A similar issue (#26368) has been opened and resolved already with the loader
config options for custom extensions/types.
Unfortunately the implemented solution still lacks the ability to perform raw imports of .ts
files. This is vital for some use-cases where documenting the examples shown in an application (IE: technical docs for a library) is achieved by including the plain source files themselves as part of the text content rendered in the app.
Describe the solution you'd like
The loader prefix used in webpack to force a particular behaviour was quite a neat solution. Anything done when defining the import file path (ie: import textContent from 'raw:./file.ts'
) is preferable over a generic project metadata config, imho.
Describe alternatives you've considered
The only possible solution at the moment seems to maintain a copy of the source file with a .txt
extension.