fix: module error (#1087)
* fix: module error refactor all suffix of bundled scripts with commonjs module from 'js' to cjs error: ReferenceError: exports is not defined in ES module scope This file is being treated as an ES module because it has a '.js' file extension and '.../rrweb/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension. * update jest config files
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"version": "0.1.7",
|
||||
"homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/rrdom#readme",
|
||||
"license": "MIT",
|
||||
"main": "lib/rrdom.js",
|
||||
"main": "lib/rrdom.cjs",
|
||||
"module": "es/rrdom.js",
|
||||
"typings": "es",
|
||||
"unpkg": "dist/rrdom.js",
|
||||
@@ -13,6 +13,7 @@
|
||||
"es",
|
||||
"typings"
|
||||
],
|
||||
"type": "module",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/rrweb-io/rrweb.git"
|
||||
|
||||
Reference in New Issue
Block a user