Closed ieugen closed 6 years ago
Hi, this library is intended to create NPM packages, ( React NPM library starter kit ) and it's definitely for browser since it's React.
Without NPM i've never tried to use library built with this starter kit, but maybe try to load React and ReactDom first and then load your bundle?
Thanks, we chosed to use nwb. It has OOTB umd module publishing.
@ieugen In case it's any help, you can modify the rollup config to output a UMD by adding this to the output:
...
output: [
{
file: pkg.main,
format: 'umd',
sourcemap: true,
name: 'exampleComponent' // this name is how the component is referenced in javascript
},
{
file: pkg.module,
format: 'es',
sourcemap: true
}
],
Hello,
I wish to publish my library to be used in browser. How can I do that? It would be great if this was added to the documentation.
Thanks,