Build: The bundle script now generates multiple bundles for different formats

This commit is contained in:
Aria Minaei 2021-06-21 14:05:48 +02:00
parent 463c226eb6
commit 6596c811d7
5 changed files with 75 additions and 26 deletions

View file

@ -13,12 +13,28 @@
"email": "hello@theatrejs.com",
"url": "https://www.theatrejs.com"
},
"main": "dist/index.js",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"browser": "dist/index.min.js",
"exports": {
".": {
"require": "./dist/index.cjs",
"import": "./dist/index.mjs",
"default": "./dist/index.cjs",
"node": "./dist/index.cjs",
"script": "./dist/index.min.js"
}
},
"types": "dist/index.d.ts",
"files": [
"dist/index.js",
"dist/index.d.ts",
"index.js.map"
"dist/index.cjs",
"dist/index.cjs.map",
"dist/index.mjs",
"dist/index.mjs.map",
"dist/index.min.js",
"dist/index.min.js.map",
"dist/index.min.js.LEGAL.txt",
"dist/index.d.ts"
],
"scripts": {
"prepack": "cd .. && yarn run prepare"