rsnext/test/integration/css-fixtures/custom-configuration-loader/next.config.js
Michel Krämer c8457e3abf
Fix disabling of built-in CSS support if there is a custom loader (#31078)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Lee Robinson <me@leerob.io>
2021-11-29 15:19:39 +01:00

20 lines
409 B
JavaScript

const config = {
webpack: (config, { defaultLoaders }) => {
config.module.rules.push({
test: /\.css$/,
use: [
defaultLoaders.babel,
{
loader: require('styled-jsx/webpack').loader,
options: {
type: (fileName, options) => options.query.type || 'scoped',
},
},
],
})
return config
},
}
module.exports = config