mirror of
https://github.com/logos-messaging/OpChan.git
synced 2026-01-05 22:33:07 +00:00
chore: enable HMR
This commit is contained in:
parent
a38723999a
commit
b7e271a0d7
@ -36,8 +36,12 @@
|
|||||||
|
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"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: {
|
server: {
|
||||||
host: '::',
|
host: '::',
|
||||||
port: 8080,
|
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()],
|
plugins: [react()],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': path.resolve(__dirname, './src'),
|
'@': path.resolve(__dirname, './src'),
|
||||||
buffer: 'buffer',
|
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: {
|
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: {
|
build: {
|
||||||
target: 'es2022',
|
target: 'es2022',
|
||||||
|
|||||||
@ -29,7 +29,7 @@ export * from './lib/forum/transformers';
|
|||||||
// Export services
|
// Export services
|
||||||
export { BookmarkService } from './lib/services/BookmarkService';
|
export { BookmarkService } from './lib/services/BookmarkService';
|
||||||
export { MessageService } from './lib/services/MessageService';
|
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 { ordinals } from './lib/services/Ordinals';
|
||||||
|
|
||||||
// Export utilities
|
// Export utilities
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user