Skip to content

Commit 1e60696

Browse files
committed
Basic build functionality.
1 parent 065f83e commit 1e60696

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

packages/shared/common/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "2.9.0",
44
"type": "module",
55
"main": "./dist/index.es.js",
6-
"types": "./dist/src/index.d.ts",
6+
"types": "./dist/index.d.ts",
77
"homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/shared/common",
88
"repository": {
99
"type": "git",
@@ -25,7 +25,7 @@
2525
},
2626
"scripts": {
2727
"test": "npx jest --ci",
28-
"build": "npx tsc && rollup -c rollup.config.js",
28+
"build": "npx tsc --noEmit && rollup -c rollup.config.js",
2929
"clean": "rimraf dist",
3030
"lint": "npx eslint . --ext .ts",
3131
"lint:fix": "yarn run lint --fix",

packages/shared/common/rollup.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ export default [
2626
plugins: [
2727
typescript({
2828
module: 'esnext',
29+
tsconfig: './tsconfig.json',
30+
outputToFilesystem: true,
2931
}),
3032
common({
3133
transformMixedEsModules: true,

packages/shared/common/tsconfig.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"outDir": "dist",
55
"target": "ES2017",
66
"lib": ["es6"],
7-
"module": "commonjs",
7+
"module": "ESNext",
8+
"moduleResolution": "node",
89
"strict": true,
910
"noImplicitOverride": true,
1011
// Needed for CommonJS modules: markdown-it, fs-extra
@@ -13,8 +14,8 @@
1314
"declaration": true,
1415
"declarationMap": true, // enables importers to jump to source
1516
"stripInternal": true,
16-
"composite": true,
17-
"emitDeclarationOnly": true
17+
"composite": true
1818
},
19+
"include": ["src"],
1920
"exclude": ["**/*.test.ts", "dist", "node_modules", "__tests__"]
2021
}

packages/shared/sdk-client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.8.0",
44
"type": "module",
55
"main": "./dist/index.es.js",
6-
"types": "./dist/src/index.d.ts",
6+
"types": "./dist/index.d.ts",
77
"homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/shared/sdk-client",
88
"repository": {
99
"type": "git",
@@ -19,7 +19,7 @@
1919
"client"
2020
],
2121
"exports": {
22-
"types": "./dist/src/index.d.ts",
22+
"types": "./dist/index.d.ts",
2323
"require": "./dist/index.cjs.js",
2424
"import": "./dist/index.es.js"
2525
},

packages/shared/sdk-client/rollup.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ export default [
2626
plugins: [
2727
typescript({
2828
module: 'esnext',
29+
tsconfig: './tsconfig.json',
30+
outputToFilesystem: true,
2931
}),
3032
common({
3133
transformMixedEsModules: true,
@@ -38,6 +40,6 @@ export default [
3840
},
3941
{
4042
...getSharedConfig('cjs', 'dist/index.cjs.js'),
41-
plugins: [typescript(), common(), resolve(), terser(), json()],
43+
plugins: [typescript({tsconfig: './tsconfig.json'}), common(), resolve(), terser(), json()],
4244
},
4345
];

0 commit comments

Comments
 (0)