If you haven't used or heard of Rollup it is an awesome bundling system that allows you to leverage es2015 modules and produce backwards compatible libraries.
Here are a few configs to help you bundle your apps.
If you haven't used or heard of Rollup it is an awesome bundling system that allows you to leverage es2015 modules and produce backwards compatible libraries.
Here are a few configs to help you bundle your apps.
import babel from 'rollup-plugin-babel'; | |
import json from 'rollup-plugin-json'; | |
var external = Object.keys( require( './package.json' ).dependencies ).concat( 'path' ); | |
export default { | |
entry: 'lib/inutFile.js', | |
dest: 'dist/destinationFile.js', | |
format: 'umd', | |
external: external, //Keep your bundles smaller by excluding 3rd party modules. | |
plugins: [ json(), babel() ], | |
moduleName: 'ModuleName' //We have to give our module a name for its Universal Module Definition | |
}; |
import babel from 'rollup-plugin-babel'; | |
import json from 'rollup-plugin-json'; | |
var external = Object.keys( require( './package.json' ).dependencies ).concat( 'path' ); | |
export default { | |
entry: 'lib/inutFile.js', | |
dest: 'dist/destinationFile.js', | |
format: 'cjs', | |
external: external, //Keep your bundles smaller by excluding 3rd party modules. | |
plugins: [ json(), babel() ] | |
}; |