update the bundle config
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
|||||||
node_modules
|
node_modules
|
||||||
package-lock.json
|
package-lock.json
|
||||||
build
|
build
|
||||||
|
dist
|
||||||
|
|||||||
10
package.json
10
package.json
@@ -1,11 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "rrweb-snapshot",
|
"name": "rrweb-snapshot",
|
||||||
"version": "0.2.0",
|
"version": "0.3.0",
|
||||||
"description": "rrweb's component to take a snapshot of DOM, aka DOM serializer",
|
"description": "rrweb's component to take a snapshot of DOM, aka DOM serializer",
|
||||||
"main": "index.js",
|
"main": "dist/index.js",
|
||||||
|
"module": "dist/module.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register test/**/*.ts",
|
"test": "TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register test/**/*.ts",
|
||||||
"compile": "rollup --config"
|
"bundle": "rollup --config"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -16,6 +17,9 @@
|
|||||||
"snapshot",
|
"snapshot",
|
||||||
"DOM"
|
"DOM"
|
||||||
],
|
],
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
"author": "yanzhen@smartx.com",
|
"author": "yanzhen@smartx.com",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|||||||
@@ -3,8 +3,19 @@ import typescript from 'rollup-plugin-typescript';
|
|||||||
export default {
|
export default {
|
||||||
input: './src/index.ts',
|
input: './src/index.ts',
|
||||||
plugins: [typescript()],
|
plugins: [typescript()],
|
||||||
output: {
|
output: [
|
||||||
name: 'rrweb',
|
{
|
||||||
format: 'iife',
|
format: 'cjs',
|
||||||
|
file: './dist/index.js',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
format: 'esm',
|
||||||
|
file: './dist/module.js',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'rrwebSnapshot',
|
||||||
|
format: 'iife',
|
||||||
|
file: './dist/browser.js',
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user