Access Resource Query in Plugins?
- Dominant language
- JavaScript
- Stars
- 4.8k
- Forks
- 456
- Avg merge
- 9h 19m
- Merged PRs (30d)
- 2
Description
Especially when files contain javascript and css it might be necessary to process the file twice.
One time for javascript and one time for css.
Is there any way to access the webpack resource query inside a babel plugin?
For example here:
```js
import { foo } from "./demo?extractOnlyCss"
import { bar } from "./demo"
```
Could a babel plugin process `./demo` twice and know about `?extractOnlyCss`?
Contributor guide
Research direction
Begin by investigating how babel-loader passes webpack resource queries into Babel plugins, using the two example imports as the reproduction. Done means establishing whether the same module can be processed twice with the query exposed, and documenting or implementing the supported behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, webpack
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100