wip: adding build step
This commit is contained in:
parent
4e4ced81ba
commit
c043c5b6a1
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"typeRoots": ["src/vite-env.d.ts"]
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"exclude": [
|
||||
"**/*.stories.tsx"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,20 +1,28 @@
|
|||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import scopeTailwind from "vite-plugin-scope-tailwind";
|
||||
import { resolve } from 'path'
|
||||
// import reactTailwindClassnamePrefixer from "./lib/vite-plugin-react-classname-prefixer";
|
||||
// import { resolve } from 'path'
|
||||
import svgr from "vite-plugin-svgr";
|
||||
import dts from 'vite-plugin-dts'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [svgr(), react(), scopeTailwind({react: true})],
|
||||
plugins: [svgr(), react(), scopeTailwind({react: true}), dts({
|
||||
tsconfigPath: "tsconfig.build.json"
|
||||
})],
|
||||
resolve: {
|
||||
// I have no clue why aliases are not working at all...
|
||||
alias: {
|
||||
'@styles/': resolve(__dirname, './styles'),
|
||||
'@components/': resolve(__dirname, './src/components'),
|
||||
'@assets/': resolve(__dirname, './src/assets'),
|
||||
'@': resolve(__dirname, './src'),
|
||||
// TODO: For some reason aliases are not working....
|
||||
// alias: {
|
||||
// '@styles/': resolve(__dirname, './styles'),
|
||||
// '@components/': resolve(__dirname, './src/components'),
|
||||
// '@assets/': resolve(__dirname, './src/assets'),
|
||||
// '@': resolve(__dirname, './src'),
|
||||
// },
|
||||
},
|
||||
build: {
|
||||
manifest: true,
|
||||
outDir: 'dist',
|
||||
emptyOutDir: true,
|
||||
sourcemap: true,
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue