Using custom webpack loaders
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [X ] feature request
Versions.
1.4.3
Desired functionality.
I have to load a custom loader to process .graphql files, I’d like to be able to add custom loaders to webpack config.
Mention any other details that might be useful.
The rule I want to add is
/* File loader for graphql files.
* Returns file content as string
*/
{
test: /\.(graphql|gql)$/,
exclude: /node_modules/,
loader: 'graphql-tag/loader'
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Writing a custom webpack loader - Redd Developer
Using a custom loader ... There are two ways to use a loader: tell webpack to resolve it from a local file, or...
Read more >Writing a Loader - webpack
A loader is a node module that exports a function. This function is called when a resource should be transformed by this loader....
Read more >How to write a Webpack loader - Advanced Web Machinery
Webpack loaders offer a way to write any custom processing step between the source file and the result the frontend gets and it...
Read more >Writing Webpack Loader - Gleb Bahmutov
Let's convert Markdown to HTML using Webpack and markdown-loader. ... using a custom local loader from a local file
Read more >Generating code and the webpack loader
Custom webpack loaders are a powerful tool for handling special cases where you need some custom need for all files with a particular...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I know this is not the answer you wanted but truth is this has been extensively discussed before, and so this issue is a duplicate of https://github.com/angular/angular-cli/issues/1656. You can read there what the final word on that topic is for now.
@akeelnazir
I came around here, because I have the exact same use-case. I want to use the
graphql-tag/loader
but without the burden ofng eject
. You can do this instead: