Raw import of .ts files as text with build-angular:application
#26575
Labels
angular/build:application
area: @angular-devkit/build-angular
feature: under consideration
Feature request for which voting has completed and the request is now under consideration
feature
Issue that requests a new feature
state: blocked on upstream
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.The text was updated successfully, but these errors were encountered: