Skip to content

Commit

Permalink
create commonjs build for SSR projects
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalfertheiner committed Apr 20, 2021
1 parent a62edd9 commit c13f3a6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
"license": "MIT",
"private": false,
"main": "dist/index.js",
"module": "dist/esm/index.js",
"typings": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"build": "npm run build:node && npm run build:esm",
"build:node": "tsc",
"build:esm": "tsc --project tsconfig.esnext.json",
"lint": "eslint --ext js,ts,tsx src",
"lint:fix": "npm run lint -- --fix",
"test": "jest --config jestconfig.json --passWithNoTests",
Expand Down
13 changes: 13 additions & 0 deletions tsconfig.esnext.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"moduleResolution": "node",
"declaration": true,
"outDir": "./dist/esm",
"strict": true,
"esModuleInterop": true
},
"include": ["src"],
"exclude": ["node_modules", "**/__test__/*", "**/__tests__/*"]
}
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"moduleResolution": "node",
"declaration": true,
"outDir": "./dist",
Expand Down

0 comments on commit c13f3a6

Please sign in to comment.