Closing as request has already been answered here: https://github.com/privatenumber/esbuild-loader/blob/6c88d413d3fdc64a621415601f45d651e4169b9a/README.md#is-it-possible-to-use-esbuild-plugins
Why not just use Webpack sass-loader?
Closing as request has already been answered here: https://github.com/privatenumber/esbuild-loader/blob/6c88d413d3fdc64a621415601f45d651e4169b9a/README.md#is-it-possible-to-use-esbuild-plugins
Why not just use Webpack sass-loader?
Why not just use Webpack sass-loader?
Because of that https://github.com/privatenumber/esbuild-loader#css-in-js, it supports only css. And I want to extend it some how.
It supports SASS too. Just add it to the bottom of the chain so it can compile the SASS first, then esbuild can minify it, then give it to css-loader
module.exports = {
...,
module: {
rules: [
{
test: /\.css$/i,
use: [
'style-loader',
'css-loader',
+ {
+ loader: 'esbuild-loader',
+ options: {
+ loader: 'css',
+ minify: true
+ }
+ },
+ 'sass-loader'
]
}
]
}
}
It supports SASS too. Just add it to the bottom of the chain so it can compile the SASS first, then esbuild can minify it, then give it to css-loader
Minification is useles in development process. But in production build it is handled by ESBuildMinifyPlugin
Assuming you're asking if Sass can be used with ESBuildMinifyPlugin
:
Sass works there too -- just add sass-loader
without esbuild-loader
like the snippet above.
LMK if you have any specific questions.
Add support for plugins #207
Feature request
Will be great to have support for some custom plugins like esbuild-plugin-sass
Why?
To have posibility to use custom transformers
Alternatives
No response
Additional context
No response