Skip to content

Commit f03d3b6

Browse files
committed
add build dir to @sentry/hub
1 parent 92c07de commit f03d3b6

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

packages/hub/.npmignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
# Info: the paths in this file are specified so that they align with the file
2+
# structure in `./build` where this file is copied to. This is done by the
3+
# prepack script `sentry-javascript/scripts/prepack.ts`.
4+
15
*
6+
27
!/dist/**/*
38
!/esm/**/*
4-
!/build/types/**/*
9+
!/types/**/*

packages/hub/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"engines": {
1010
"node": ">=6"
1111
},
12-
"main": "dist/index.js",
13-
"module": "esm/index.js",
12+
"main": "build/dist/index.js",
13+
"module": "build/esm/index.js",
1414
"types": "build/types/index.d.ts",
1515
"publishConfig": {
1616
"access": "public"
@@ -33,6 +33,7 @@
3333
"build:es5:watch": "yarn build:cjs:watch # *** backwards compatibility - remove in v7 ***",
3434
"build:esm:watch": "tsc -p tsconfig.esm.json --watch",
3535
"build:types:watch": "tsc -p tsconfig.types.json --watch",
36+
"build:npm": "ts-node ../../scripts/prepack.ts -noBundles && npm pack ./build",
3637
"circularDepCheck": "madge --circular src/index.ts",
3738
"clean": "rimraf dist esm coverage",
3839
"fix": "run-s fix:eslint fix:prettier",
@@ -41,8 +42,7 @@
4142
"link:yarn": "yarn link",
4243
"lint": "run-s lint:prettier lint:eslint",
4344
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
44-
"lint:prettier": "prettier --check \"{src,test,scripts}/**/*.ts\"",
45-
"build:npm": "npm pack",
45+
"lint:prettier": "prettier --check \"{src,test}/**/*.ts\"",
4646
"test": "jest",
4747
"test:watch": "jest --watch"
4848
},

packages/hub/tsconfig.cjs.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
"compilerOptions": {
55
"module": "commonjs",
6-
"outDir": "dist"
6+
"outDir": "build/dist"
77
}
88
}

packages/hub/tsconfig.esm.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
"compilerOptions": {
55
"module": "es6",
6-
"outDir": "esm"
6+
"outDir": "build/esm"
77
}
88
}

0 commit comments

Comments
 (0)