Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the issues after adding esm #67

Merged
merged 1 commit into from
May 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
"dist/*"
],
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"main": "dist/cjs/index.js",
"types": "dist/types/index.d.ts",
"module": "dist/index.mjs",
"exports": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
"import": "./dist/esm/index.mjs",
"require": "./dist/cjs/index.js"
},
"scripts": {
"build:cjs": "babel src --out-dir dist --extensions \".ts\" --out-file-extension .js",
"build:esm": "BABEL_ESM=true babel src --out-dir dist --extensions \".ts\" --out-file-extension .mjs",
"build:cjs": "babel src --out-dir dist/cjs --extensions \".ts\"",
"build:esm": "BABEL_ESM=true babel src --out-dir dist/esm --extensions \".ts\"",
"build:tsc": "tsc --emitDeclarationOnly",
"build": "yarn build:cjs && yarn build:esm && yarn build:tsc",
"lint": "eslint src --ext .js,.ts",
Expand Down Expand Up @@ -73,7 +73,7 @@
"babel-jest": "^26.6.3",
"common-tags": "^1.8.0",
"eslint": "^7.23.0",
"jest": "^26.6.3",
"jest": "^26.6.3",
"prettier": "^2.2.1",
"regenerator-runtime": "^0.13.7",
"typescript": "^4.2.3"
Expand Down
2 changes: 1 addition & 1 deletion test/browser/index.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as src from '../../src';
import * as dist from '../../dist';
import * as dist from '../../dist/cjs';

const tests = ({ stringify, parse }) => {
test('HTML Event', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/common/index.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as src from '../../src';
import * as dist from '../../dist';
import * as dist from '../../dist/cjs';

const regex1 = /foo/;
const regex2 = /foo/g;
Expand Down
2 changes: 1 addition & 1 deletion test/node/index.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as src from '../../src';
import * as dist from '../../dist';
import * as dist from '../../dist/cjs';

const tests = ({ stringify }) => {
test('stringify the global object', () => {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"noImplicitAny": true,
"esModuleInterop": true,
"types": ["jest"],
"outDir": "dist"
"outDir": "dist/types"
},
"include": ["src"],
"exclude": ["dist"]
Expand Down