Skip to content

Instantly share code, notes, and snippets.

@mxro
Created October 20, 2022 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mxro/4cf36d26ac7ad712f03cf9ca7e7d0bd3 to your computer and use it in GitHub Desktop.
Save mxro/4cf36d26ac7ad712f03cf9ca7e7d0bd3 to your computer and use it in GitHub Desktop.
return {
plugins: [
ignorePlugin({ ignore: ['ui'] }),
cssPlugin({
excludeCSSInject: !args.includeCss,
cssConfig: {
plugins: [],
},
}),
pnpPlugin(),
],
bundle: true,
outfile: '/dist/tmp/bundle.js', // this is used for nothing. But if not supplying it, CSS modules plugin fails
external: [
'esbuild',
'@yarnpkg/esbuild-plugin-pnp',
'@swc/core',
'@swc/jest',
'@goldstack/template-ssr-server', // this is only required on the server side
],
minify: true,
sourcemap: 'inline',
metafile: false,
platform: 'browser',
format: 'iife',
treeShaking: true,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment