Skip to content

Commit

Permalink
Fix build docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ductinhkx97 committed Sep 21, 2024
1 parent 9327615 commit 9704f79
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions docs/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,24 @@ import * as path from 'path';
import react from '@vitejs/plugin-react'; // you can also use @vitejs/plugin-react-swc
import pages from 'vite-plugin-react-pages';

export default defineConfig({
plugins: [
react(),
pages({
pagesDir: path.join(__dirname, 'pages'),
}),
],
base: 'dnd-tree-sortable/docs/dist',
resolve: {
alias: {
'dnd-tree-sortable': path.join(__dirname, '../lib'),
react: 'react',
'react-dom': 'react-dom',
export default defineConfig(() => {
return {
plugins: [
react(),
pages({
pagesDir: path.join(__dirname, 'pages'),
}),
],
base:
process.env.NODE_ENV === 'producton'
? 'https://ductinhkzz.github.io/dnd-tree-sortable'
: 'dnd-tree-sortable/docs/dist',
resolve: {
alias: {
'dnd-tree-sortable': path.join(__dirname, '../lib'),
react: 'react',
'react-dom': 'react-dom',
},
},
},
};
});

0 comments on commit 9704f79

Please sign in to comment.