Skip to content

Commit

Permalink
bundle shared data
Browse files Browse the repository at this point in the history
  • Loading branch information
shlokamin committed May 20, 2024
1 parent 420a8f8 commit 1e81b40
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion shared-data/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ lib-js: export NODE_ENV := production
lib-js:
NODE_OPTIONS=--openssl-legacy-provider yarn vite build


.PHONY: build-ts
build-ts:
yarn tsc --build --emitDeclarationOnly

# Python targets

Expand Down
2 changes: 1 addition & 1 deletion shared-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "Apache-2.0",
"source": "js/index.ts",
"types": "lib/js/index.d.ts",
"main": "lib/opentrons-shared-data.js",
"main": "lib/index.mjs",
"module": "js/index.ts",
"dependencies": {
"ajv": "^6.12.3",
Expand Down
2 changes: 2 additions & 0 deletions shared-data/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export default defineConfig({
// Relative to the root
ssr: 'js/index.ts',
outDir: 'lib',
// do not delete the outdir, typescript types might live there and we dont want to delete them
emptyOutDir: false,
commonjsOptions: {
transformMixedEsModules: true,
esmExternals: true,
Expand Down

0 comments on commit 1e81b40

Please sign in to comment.