Commit cb13e874 authored by Shen Chang's avatar Shen Chang

style: output cjs files

parent 11e9f40b
node_modules node_modules
coverage coverage
es/** es/**
cjs/**
{ {
"name": "react-keep-alive", "name": "react-keep-alive",
"version": "2.0.1", "version": "2.0.2",
"description": "Package will allow components to maintain their status, to avoid repeated re-rendering.", "description": "Package will allow components to maintain their status, to avoid repeated re-rendering.",
"author": "Shen Chang", "author": "Shen Chang",
"homepage": "https://github.com/Sam618/react-keep-alive", "homepage": "https://github.com/Sam618/react-keep-alive",
...@@ -17,15 +17,18 @@ ...@@ -17,15 +17,18 @@
"bugs": { "bugs": {
"url": "https://github.com/Sam618/react-keep-alive/issues" "url": "https://github.com/Sam618/react-keep-alive/issues"
}, },
"main": "es/index.js", "main": "cjs/index.js",
"module": "es/index.js",
"scripts": { "scripts": {
"clean": "rimraf es", "clean:es": "rimraf es",
"clean:cjs": "rimraf cjs",
"test": "jest", "test": "jest",
"codecov": "codecov", "codecov": "codecov",
"build:demo": "webpack", "build:demo": "webpack",
"build:es": "npm run clean && tsc", "build:es": "npm run clean:es && tsc",
"build:cjs": "npm run clean:cjs && tsc --outDir cjs --module commonjs",
"start:demo": "webpack-dev-server --hot --historyApiFallback", "start:demo": "webpack-dev-server --hot --historyApiFallback",
"start:es": "npm run clean && tsc -w -sourcemap --outDir es" "start:es": "npm run clean:es && tsc -w -sourcemap --outDir es"
}, },
"husky": { "husky": {
"hooks": { "hooks": {
...@@ -69,6 +72,11 @@ ...@@ -69,6 +72,11 @@
"webpack-cli": "^3.2.3", "webpack-cli": "^3.2.3",
"webpack-dev-server": "^3.1.14" "webpack-dev-server": "^3.1.14"
}, },
"peerDependencies": {
"react": ">=16.3.0",
"react-dom": ">=16.3.0",
"react-router-dom": ">=5.0.0"
},
"config": { "config": {
"commitizen": { "commitizen": {
"path": "./node_modules/cz-conventional-changelog" "path": "./node_modules/cz-conventional-changelog"
......
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