github vanilla-extract-css/vanilla-extract @vanilla-extract/esbuild-plugin@1.1.0

latest releases: @vanilla-extract/vite-plugin@4.0.13, @vanilla-extract/parcel-transformer@1.0.7, @vanilla-extract/vite-plugin@4.0.12...
3 years ago

Minor Changes

  • #183 6721228 Thanks @Brendan-csel! - Add processCss plugin option to allow further processing of CSS while bundling.

    Example for postcss with autoprefixer:

    const { vanillaExtractPlugin } = require('@vanilla-extract/esbuild-plugin');
    const postcss = require('postcss');
    const autoprefixer = require('autoprefixer');
    
    async function processCss(css) {
      const result = await postcss([autoprefixer]).process(css, {
        from: undefined /* suppress source map warning */,
      });
    
      return result.css;
    }
    
    require('esbuild')
      .build({
        entryPoints: ['app.ts'],
        bundle: true,
        plugins: [
          vanillaExtractPlugin({
            processCss,
          }),
        ],
        outfile: 'out.js',
      })
      .catch(() => process.exit(1));

Don't miss a new vanilla-extract release

NewReleases is sending notifications on new releases.