19 lines
533 B
JavaScript
19 lines
533 B
JavaScript
import { fileURLToPath, URL } from 'node:url';
|
|
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
|
|
const shim = (name) => fileURLToPath(new URL(`./src/shims/${name}.js`, import.meta.url));
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
'node:util': shim('node-util'),
|
|
'node:fs': shim('node-fs'),
|
|
'node:child_process': shim('node-child_process'),
|
|
'node:events': shim('node-events'),
|
|
'node:path': shim('node-path'),
|
|
'node:process': shim('node-process'),
|
|
},
|
|
},
|
|
});
|