Skip to content

Instantly share code, notes, and snippets.

@bahkostya
Last active May 31, 2021 13:41
Show Gist options
  • Save bahkostya/419776350fe6d148c37eaeeefb4c5a5d to your computer and use it in GitHub Desktop.
Save bahkostya/419776350fe6d148c37eaeeefb4c5a5d to your computer and use it in GitHub Desktop.
import { nodeResolve } from 'Y:/dev/deps/node_modules/@rollup/plugin-node-resolve';
import commonjs from 'Y:/dev/deps/node_modules/@rollup/plugin-commonjs';
import clear from 'Y:/dev/deps/node_modules/rollup-plugin-clear';
import esbuild from 'Y:/dev/deps/node_modules/rollup-plugin-esbuild';
import alias from 'Y:/dev/appdev/client/node_modules/@rollup/plugin-alias';
export default {
input: 'index.js',
output: {
dir: 'dist',
format: 'es',
chunkFileNames: '[name].js',
sourcemap: true,
},
plugins: [
esbuild({
sourceMap: true,
define: {
'process.env.NODE_ENV': JSON.stringify('development'),
},
loaders: {
'.js': 'jsx',
},
}),
alias({
entries: {
react: 'Y:/dev/deps/node_modules/react',
},
customResolver: nodeResolve(),
}),
nodeResolve(),
commonjs({ transformMixedEsModules: true }),
clear({
targets: ['dist'],
}),
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment