Skip to content

Commit 8199b59

Browse files
committed
adjust config to become a package with bundles
1 parent 7bcd663 commit 8199b59

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

packages/serverless/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"engines": {
1010
"node": ">=10"
1111
},
12-
"main": "build/cjs/index.js",
13-
"module": "build/esm/index.js",
14-
"types": "build/types/index.d.ts",
12+
"main": "build/npm/cjs/index.js",
13+
"module": "build/npm/esm/index.js",
14+
"types": "build/npm/types/index.d.ts",
1515
"publishConfig": {
1616
"access": "public"
1717
},
@@ -48,7 +48,7 @@
4848
"build:dev:watch": "run-s build:watch",
4949
"build:rollup:watch": "rollup -c rollup.npm.config.js --watch",
5050
"build:types:watch": "tsc -p tsconfig.types.json --watch",
51-
"build:npm": "ts-node ../../scripts/prepack.ts && npm pack ./build",
51+
"build:npm": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm",
5252
"circularDepCheck": "madge --circular src/index.ts",
5353
"clean": "rimraf build dist-awslambda-layer coverage sentry-serverless-*.tgz",
5454
"fix": "run-s fix:eslint fix:prettier",

packages/serverless/rollup.npm.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ import { makeBaseNPMConfig, makeNPMConfigVariants } from '../../rollup/index.js'
33
export default makeNPMConfigVariants(
44
makeBaseNPMConfig({
55
entrypoints: ['src/index.ts', 'src/awslambda-auto.ts'],
6+
// packages with bundles have a different build directory structure
7+
hasBundles: true,
68
}),
79
);

packages/serverless/tsconfig.types.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"declaration": true,
1010
"declarationMap": true,
1111
"emitDeclarationOnly": true,
12-
"outDir": "build/types"
12+
"outDir": "build/npm/types"
1313
}
1414
}

0 commit comments

Comments
 (0)