feat(build): bundle frontend with vite and matrix-js-sdk, fix HOST in server.js
This commit is contained in:
1 parent
5ce3b46bab
commit
b6cc9f3465
8 files changed
+3421
-9
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
||||
import path from 'path';
|
||||
|
||||
export default defineConfig({
|
||||
root: 'public',
|
||||
plugins: [
|
||||
nodePolyfills({
|
||||
include: ['buffer', 'crypto', 'events', 'stream', 'util'],
|
||||
globals: {
|
||||
Buffer: true,
|
||||
global: true,
|
||||
process: true,
|
||||
},
|
||||
}),
|
||||
],
|
||||
build: {
|
||||
outDir: '../dist',
|
||||
emptyOutDir: true,
|
||||
target: 'esnext',
|
||||
minify: 'esbuild',
|
||||
rollupOptions: {
|
||||
input: path.resolve(import.meta.dirname, 'public/index.html'),
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user