next.js
c6de6240 - Turbopack: add support for contentType condition for webpack loaders (#89156)

Commit
24 days ago
Turbopack: add support for contentType condition for webpack loaders (#89156) ### What? Add `contentType` condition This allows to apply webpack loaders to data urls ### Usage Example ``` module.exports = { turbopack: { rules: { '*': [ { condition: { contentType: 'text/*' }, // glob match loaders: ['text-loader'], as: '*.js' }, { condition: { contentType: /^image\// }, // regex match loaders: ['image-loader'], as: '*.js' }, ], }, }, } ```
Author
Parents
Loading