Skip to content

Commit

Permalink
Merge pull request #40 from hms-dbmi/thomcsmits/add-exports
Browse files Browse the repository at this point in the history
add exports to library
  • Loading branch information
thomcsmits authored Oct 3, 2024
2 parents a5a2f74 + 9df5230 commit e2e1425
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/dataLoading/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { loadHuBMAPData } from "./dataHuBMAP";
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { loadHuBMAPData } from "./dataLoading";
export { renderCellPopVisualization } from "./visualization";
export { getMainVis } from "./cellpop";
export { CellPop } from ".//CellPopComponent";
19 changes: 18 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
import path from "path";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

// https://vitejs.dev/config/
export default defineConfig({
build: {
lib: {
entry: path.resolve(__dirname, "src/index.ts"),
name: "cellpop",
fileName: (format) => `index.${format}.js`
},
rollupOptions: {
external: ["react", "react-dom"],
output: {
globals: {
react: "React",
"react-dom": "ReactDOM",
},
},
},
},
plugins: [react()],
base: "/cellpop/"
base: "/cellpop/",
});

0 comments on commit e2e1425

Please sign in to comment.