Open
Description
Environment
"unplugin": "^1.4.0",
"webpack": "^5.88.2",
Reproduction
const unplugin = createUnplugin((options) => {
return {
name: 'test',
load(id) {
console.log(id,'load hook')
return null
},
transform() {
console.log('transform hook')
return null
},
buildStart() {
console.log('build start hook')
}
}
})
The console outputs are:
build start hook
transform hook
C:\xxx\src\index.js load hook
Describe the bug
From the source code, I found out the transform hook was handled before the load hook. And unshift()
was used to put the generated loader into the webpack config. Should the load hook be handled earlier than the transform hook?
Additional context
No response
Logs
No response
Metadata
Assignees
Labels
No labels