| 
									
										
										
										
											2021-06-21 10:21:40 +02:00
										 |  |  | import babel from '@rollup/plugin-babel'; | 
					
						
							|  |  |  | import commonjs from '@rollup/plugin-commonjs'; | 
					
						
							| 
									
										
										
										
											2021-08-02 15:39:40 +02:00
										 |  |  | import { nodeResolve } from '@rollup/plugin-node-resolve'; | 
					
						
							|  |  |  | import postcss from 'rollup-plugin-postcss'; | 
					
						
							| 
									
										
										
										
											2021-06-21 10:21:40 +02:00
										 |  |  | import { terser } from 'rollup-plugin-terser'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const production = process.env.NODE_ENV !== 'development'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const config = { | 
					
						
							|  |  |  |   input: 'src/index.js', | 
					
						
							|  |  |  |   output: [ | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       file: 'dist/bundle.js', | 
					
						
							|  |  |  |       format: 'cjs' | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       file: 'dist/bundle.esm.js', | 
					
						
							|  |  |  |       format: 'es' | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       file: 'dist/bundle.iife.js', | 
					
						
							|  |  |  |       format: 'iife', | 
					
						
							|  |  |  |       globals: { react: 'React' }, | 
					
						
							|  |  |  |       name: 'uiComponents' | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   ], | 
					
						
							|  |  |  |   plugins: [ | 
					
						
							|  |  |  |     nodeResolve(), | 
					
						
							|  |  |  |     postcss(), | 
					
						
							|  |  |  |     babel({ babelHelpers: 'bundled' }), | 
					
						
							|  |  |  |     commonjs(), | 
					
						
							|  |  |  |     production && terser() | 
					
						
							|  |  |  |   ], | 
					
						
							|  |  |  |   external: ['react'] | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default config; |