We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf9a270 commit fc5f239Copy full SHA for fc5f239
package.json
@@ -2,10 +2,11 @@
2
"name": "@jaebradley/example-rollup-react-component-npm-package",
3
"version": "0.0.0-development",
4
"description": "Example React Component for npm Publication using Rollup",
5
- "main": "./build/index.js",
6
- "module": "./build/index.es.js",
+ "main": "build/index.cjs.js",
+ "module": "build/index.esm.js",
7
+ "browser": "build/index.umd.js",
8
"files": [
- "./build"
9
+ "build"
10
],
11
"scripts": {
12
"build": "rollup -c",
rollup.config.js
@@ -13,10 +13,15 @@ const config = {
13
input: 'src/index.js',
14
output: [
15
{
16
- file: pkg.main,
+ file: pkg.browser,
17
format: 'umd',
18
name: 'Example',
19
},
20
+ {
21
+ file: pkg.main,
22
+ format: 'cjs',
23
+ name: 'Example',
24
+ },
25
26
file: pkg.module,
27
format: 'es',
0 commit comments