Skip to content

Commit

Permalink
fix(highlight-vdom): remove UMD entry points and add CommonJS (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahdayan authored Jul 18, 2022
1 parent 03bd699 commit 7941870
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = (api) => {
const isTest = api.env('test');
const modules = isTest ? 'commonjs' : false;
const isCjs = api.env('cjs');
const modules = isTest || isCjs ? 'commonjs' : false;
const targets = {};

if (isTest) {
Expand Down
8 changes: 3 additions & 5 deletions packages/highlight-vdom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
"source": "src/index.ts",
"types": "dist/esm/index.d.ts",
"module": "dist/esm/index.js",
"main": "dist/umd/index.js",
"umd:main": "dist/umd/index.js",
"unpkg": "dist/umd/index.js",
"jsdelivr": "dist/umd/index.js",
"main": "dist/cjs/index.js",
"sideEffects": false,
"files": [
"dist/"
Expand All @@ -23,7 +20,8 @@
"build:clean": "rm -rf ./dist",
"build:esm": "babel src --root-mode upward --extensions '.ts,.tsx' --out-dir dist/esm --ignore '**/*/__tests__/'",
"build:types": "tsc -p ./tsconfig.declaration.json --outDir ./dist/esm",
"build": "yarn build:clean && yarn build:esm && yarn build:types",
"build:cjs": "BABEL_ENV=cjs babel src --root-mode upward --extensions '.ts,.tsx' --out-dir dist/cjs --ignore '**/*/__tests__/'",
"build": "yarn build:clean && yarn build:esm && yarn build:cjs && yarn build:types",
"prepare": "yarn build:esm && yarn build:types"
},
"dependencies": {
Expand Down

0 comments on commit 7941870

Please sign in to comment.