Skip to content

Commit

Permalink
fixed vite config
Browse files Browse the repository at this point in the history
  • Loading branch information
Elena Gromova committed Jan 28, 2024
1 parent 64d37fa commit 7741342
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 21 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
```bash
npm i @hexlet/chatbot-v2
```
1. Импортировать стили:
2. Импортировать стили:
```javascript
import '@hexlet/chatbot-v2/styles'
```
1. Импортировать и запустить бота:
3. Импортировать и запустить бота:
```javascript
import app from 'chatbot-v2';
Expand Down
43 changes: 24 additions & 19 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,29 @@ import react from '@vitejs/plugin-react';
import { resolve } from 'path';

// https://vitejs.dev/config/
// export default defineConfig({
// plugins: [react()],
// build: {
// lib: {
// // Could also be a dictionary or array of multiple entry points
// entry: resolve(__dirname, 'src/app.tsx'),
// name: 'hexlet-flowbot',
// // the proper extensions will be added
// fileName: 'hexlet-flowbot',
// },
// rollupOptions: {
// external: ['react', 'react-dom'],
// output: {
// globals: {
// react: 'React',
// 'react-dom': 'ReactDOM',
// },
// },
// },
// },
// })

export default defineConfig({
plugins: [react()],
build: {
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, 'src/app.tsx'),
name: 'hexlet-flowbot',
// the proper extensions will be added
fileName: 'hexlet-flowbot',
},
rollupOptions: {
external: ['react', 'react-dom'],
output: {
globals: {
react: 'React',
'react-dom': 'ReactDOM',
},
},
},
},
})
base: '/react-flowbot-ui-kit/'
})

0 comments on commit 7741342

Please sign in to comment.