build(ui): fix types exports

This commit is contained in:
psychedelicious 2023-04-28 21:25:25 +10:00
parent a591184d2a
commit d92d5b5258
5 changed files with 21 additions and 16 deletions

View File

@ -11,7 +11,4 @@ export const appConfig: UserConfig = {
tsconfigPaths(),
visualizer() as unknown as PluginOption,
],
build: {
chunkSizeWarningLimit: 1500,
},
};

View File

@ -1,8 +1,4 @@
import react from '@vitejs/plugin-react-swc';
import { visualizer } from 'rollup-plugin-visualizer';
import { PluginOption, UserConfig } from 'vite';
import eslint from 'vite-plugin-eslint';
import tsconfigPaths from 'vite-tsconfig-paths';
import { UserConfig } from 'vite';
export const commonConfig: UserConfig = {
base: './',

View File

@ -17,19 +17,29 @@ export const packageConfig: UserConfig = {
}),
],
build: {
chunkSizeWarningLimit: 1500,
lib: {
entry: path.resolve(__dirname, '../src/index.ts'),
name: 'InvokeAIUI',
fileName: (format) => `invoke-ai-ui.${format}.js`,
},
rollupOptions: {
external: ['react', 'react-dom'],
external: ['react', 'react-dom', '@emotion/react'],
output: {
globals: {
react: 'React',
'react-dom': 'ReactDOM',
},
},
},
},
resolve: {
alias: {
app: path.resolve(__dirname, '../src/app'),
assets: path.resolve(__dirname, '../src/assets'),
common: path.resolve(__dirname, '../src/common'),
features: path.resolve(__dirname, '../src/features'),
services: path.resolve(__dirname, '../src/services'),
theme: path.resolve(__dirname, '../src/theme'),
},
},
};

View File

@ -14,10 +14,13 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"baseUrl": "src",
"jsx": "react-jsx"
"jsx": "react-jsx",
"baseUrl": "./",
"paths": {
"*": ["./src/*"]
}
},
"include": ["src", "index.d.ts"],
"exclude": ["src/services/fixtures/*"],
"include": ["src/**/*.ts", "src/**/*.tsx", "*.d.ts"],
"exclude": ["src/services/fixtures/*", "node_modules", "dist"],
"references": [{ "path": "./tsconfig.node.json" }]
}

View File

@ -3,8 +3,7 @@
"composite": true,
"module": "ESNext",
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true,
"baseUrl": "src"
"allowSyntheticDefaultImports": true
},
"include": [
"vite.config.ts",