mirror of
https://github.com/logos-messaging/OpChan.git
synced 2026-01-02 12:53:10 +00:00
chore: enable HMR
This commit is contained in:
parent
a38723999a
commit
b7e271a0d7
@ -36,8 +36,12 @@
|
||||
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
"@/*": ["./src/*"],
|
||||
"@opchan/core": ["../packages/core/src/index.ts"],
|
||||
"@opchan/core/*": ["../packages/core/src/*"],
|
||||
"@opchan/react": ["../packages/react/src/index.ts"],
|
||||
"@opchan/react/*": ["../packages/react/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["src"]
|
||||
"include": ["src", "../packages/core/src", "../packages/react/src"]
|
||||
}
|
||||
|
||||
@ -7,16 +7,29 @@ export default defineConfig(() => ({
|
||||
server: {
|
||||
host: '::',
|
||||
port: 8080,
|
||||
watch: {
|
||||
// Watch source files in local packages for hot reload
|
||||
ignored: ['!**/node_modules/@opchan/**'],
|
||||
},
|
||||
fs: {
|
||||
// Allow serving files from the monorepo root
|
||||
allow: ['..'],
|
||||
},
|
||||
},
|
||||
plugins: [react()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
buffer: 'buffer',
|
||||
// Point to source files instead of dist for hot reloading
|
||||
'@opchan/core': path.resolve(__dirname, '../packages/core/src/index.ts'),
|
||||
'@opchan/react': path.resolve(__dirname, '../packages/react/src/index.ts'),
|
||||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: ['buffer', '@opchan/core', '@opchan/hooks'],
|
||||
include: ['buffer'],
|
||||
// Exclude local packages from pre-bundling to enable hot reload
|
||||
exclude: ['@opchan/core', '@opchan/react'],
|
||||
},
|
||||
build: {
|
||||
target: 'es2022',
|
||||
|
||||
@ -29,7 +29,7 @@ export * from './lib/forum/transformers';
|
||||
// Export services
|
||||
export { BookmarkService } from './lib/services/BookmarkService';
|
||||
export { MessageService } from './lib/services/MessageService';
|
||||
export { UserIdentityService, UserIdentity } from './lib/services/UserIdentityService';
|
||||
export { UserIdentityService, type UserIdentity } from './lib/services/UserIdentityService';
|
||||
export { ordinals } from './lib/services/Ordinals';
|
||||
|
||||
// Export utilities
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user