forked from jaredpalmer/formik
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
22 lines (21 loc) · 744 Bytes
/
rollup.config.js
File metadata and controls
22 lines (21 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import resolve from 'rollup-plugin-node-resolve';
import sourceMaps from 'rollup-plugin-sourcemaps';
export default {
entry: `compiled/formik.js`,
targets: [{ dest: 'dist/formik.es6.js', format: 'es' }, { dest: 'dist/formik.js', format: 'cjs' }],
sourceMap: true,
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
external: ['react'],
globals: {
react: 'React',
},
exports: 'named',
plugins: [
// Allow node_modules resolution, so you can use 'external' to control
// which external modules to include in the bundle
// https://github.com/rollup/rollup-plugin-node-resolve#usage
resolve(),
// Resolve source maps to the original source
sourceMaps(),
],
};