mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-11 12:30:25 +08:00
Made it possible to build package by tsc
This commit is contained in:
@@ -7,14 +7,16 @@
|
||||
"main": "pkg/index.js",
|
||||
"types": "types/index.d.ts",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
"build": "tsc -d",
|
||||
"lint": "biome lint .",
|
||||
"preview": "vite preview --port 5173",
|
||||
"fmt": "biome format --write .",
|
||||
"storybook": "storybook dev -p 6006",
|
||||
"build-storybook": "storybook build"
|
||||
},
|
||||
"files": [
|
||||
"pkg",
|
||||
"types"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/optuna/optuna-dashboard.git"
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
export { DataGrid } from "./DataGrid";
|
||||
export type { DataGridColumn } from "./DataGrid";
|
||||
@@ -0,0 +1,2 @@
|
||||
export { DataGrid } from "./components/DataGrid";
|
||||
export type { DataGridColumn } from "./components/DataGrid";
|
||||
@@ -16,7 +16,6 @@
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"target": "ES2020",
|
||||
"sourceMap": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"declaration": true,
|
||||
"declarationDir": "./types",
|
||||
"strict": true,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import react from "@vitejs/plugin-react-swc";
|
||||
import { defineConfig } from "vite";
|
||||
import { resolve } from "path";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
@@ -16,22 +15,4 @@ export default defineConfig({
|
||||
exclude: ["@sqlite.org/sqlite-wasm"],
|
||||
},
|
||||
plugins: [react()],
|
||||
build: {
|
||||
lib: {
|
||||
entry: resolve(__dirname, "src/components/index.ts"),
|
||||
name: "@optuna/storybook",
|
||||
fileName: "index",
|
||||
},
|
||||
rollupOptions: {
|
||||
external: ["react", "react-dom"],
|
||||
output: {
|
||||
globals: {
|
||||
react: "React",
|
||||
"react-dom": "ReactDOM",
|
||||
},
|
||||
},
|
||||
},
|
||||
outDir: "pkg",
|
||||
emptyOutDir: false,
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user