diff --git a/packages/parse5-html-rewriting-stream/package.json b/packages/parse5-html-rewriting-stream/package.json
index db8291763..3c45f85d9 100644
--- a/packages/parse5-html-rewriting-stream/package.json
+++ b/packages/parse5-html-rewriting-stream/package.json
@@ -17,15 +17,21 @@
"HTML"
],
"license": "MIT",
- "main": "dist/index.js",
+ "main": "dist/cjs/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
- "exports": "./dist/index.js",
+ "exports": {
+ "import": "./dist/index.js",
+ "require": "./dist/cjs/index.js"
+ },
"dependencies": {
"entities": "^4.5.0",
"parse5": "^7.0.0",
"parse5-sax-parser": "^7.0.0"
},
+ "scripts": {
+ "build:cjs": "tsc --module CommonJS --target ES6 --outDir dist/cjs && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json"
+ },
"repository": {
"type": "git",
"url": "git://github.com/inikulin/parse5.git"
diff --git a/packages/parse5-plain-text-conversion-stream/package.json b/packages/parse5-plain-text-conversion-stream/package.json
index ded6602ee..6f8eb523e 100644
--- a/packages/parse5-plain-text-conversion-stream/package.json
+++ b/packages/parse5-plain-text-conversion-stream/package.json
@@ -17,14 +17,20 @@
"plain text"
],
"license": "MIT",
- "main": "dist/index.js",
+ "main": "dist/cjs/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
- "exports": "./dist/index.js",
+ "exports": {
+ "import": "./dist/index.js",
+ "require": "./dist/cjs/index.js"
+ },
"dependencies": {
"parse5": "^7.0.0",
"parse5-parser-stream": "^7.0.0"
},
+ "scripts": {
+ "build:cjs": "tsc --module CommonJS --target ES6 --outDir dist/cjs && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json"
+ },
"repository": {
"type": "git",
"url": "git://github.com/inikulin/parse5.git"
diff --git a/packages/parse5-sax-parser/package.json b/packages/parse5-sax-parser/package.json
index 1251f9e88..6b3ae09e2 100644
--- a/packages/parse5-sax-parser/package.json
+++ b/packages/parse5-sax-parser/package.json
@@ -15,13 +15,19 @@
"SAX"
],
"license": "MIT",
- "main": "dist/index.js",
+ "main": "dist/cjs/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
- "exports": "./dist/index.js",
+ "exports": {
+ "import": "./dist/index.js",
+ "require": "./dist/cjs/index.js"
+ },
"dependencies": {
"parse5": "^7.0.0"
},
+ "scripts": {
+ "build:cjs": "tsc --module CommonJS --target ES6 --outDir dist/cjs && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json"
+ },
"repository": {
"type": "git",
"url": "git://github.com/inikulin/parse5.git"