diff --git a/package.json b/package.json index 812efb2..8754d24 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "./esm/": "./dist/esm/" }, "scripts": { - "build:esm": "tsc && tsc-alias", - "build:cjs": "tsc --module commonjs --outDir dist/cjs && tsc-alias --outDir dist/cjs", + "build:esm": "tsc -p tsconfig.prod.json && tsc-alias -p tsconfig.prod.json", + "build:cjs": "tsc -p tsconfig.prod.json --module commonjs --outDir dist/cjs && tsc-alias -p tsconfig.prod.json --outDir dist/cjs", "build:storybook": "build-storybook --webpack-stats-json", "build": "npm-run-all build:*", "test": "run-s test:lint", diff --git a/tsconfig.prod.json b/tsconfig.prod.json new file mode 100644 index 0000000..26f0c35 --- /dev/null +++ b/tsconfig.prod.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig", + "exclude": ["node_modules", "dist", "**/*.stories.*", "src/tests", "src/fixtures"] +}