提交:1、导XML格式的CNC 2、NCwriter功能填充
This commit is contained in:
34
vite.config.ts
Normal file
34
vite.config.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
/// <reference types="vitest/config" />
|
||||
import { defineConfig } from 'vite'
|
||||
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
||||
import { resolve } from 'node:path';
|
||||
import dts from 'vite-plugin-dts';
|
||||
|
||||
let basePath = process.env.basePath ?? '';
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
base: basePath,
|
||||
plugins: [
|
||||
nodePolyfills(),
|
||||
dts({rollupTypes: true, tsconfigPath: './tsconfig.app.json',insertTypesEntry: true}),
|
||||
],
|
||||
build: {
|
||||
modulePreload: {
|
||||
resolveDependencies() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
lib: {
|
||||
entry: resolve(__dirname, 'src/index.ts'),
|
||||
name: 'MesProcessors',
|
||||
fileName(format) {
|
||||
return `mes-processors.${format}.js`
|
||||
},
|
||||
formats: ['es', 'umd', 'iife']
|
||||
}
|
||||
},
|
||||
esbuild: {
|
||||
drop: process.env.NODE_ENV === 'production' ? ['console', 'debugger'] : [],
|
||||
},
|
||||
})
|
Reference in New Issue
Block a user