Commit b5b3dd8d authored by Mickaël Bourgier's avatar Mickaël Bourgier
Browse files

📦 Configure CJS and ES6 compilation

parent c7d7071a
......@@ -23,10 +23,13 @@
"dist",
"src"
],
"main": "dist/cjs/index.js",
"main": "dist/index.js",
"module": "dist/es/index.js",
"typings": "dist/index.d.ts",
"scripts": {
"build": "rm -rf dist && tsc --rootDir ./src --outDir ./dist --declaration",
"build": "rm -rf dist && yarn build:cjs && yarn build:es",
"build:cjs": "tsc --rootDir ./src --outDir ./dist --declaration",
"build:es": "tsc --rootDir ./src --outDir ./dist/es --declaration --target ES6 --moduleResolution node",
"build:check": "tsc --noEmit",
"dev": "WEBPACK_TARGET=docs yarn docs:dev",
"docs:build": "rm -rf docs/dist && NODE_ENV=production WEBPACK_TARGET=docs webpack",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment