Skip to content

@vanilla-extract/[email protected]

Choose a tag to compare

@seek-oss-ci seek-oss-ci released this 04 Jun 06:06
· 542 commits to master since this release
9d699b5

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));