Files
zeroone/vite.main.config.mjs
2024-02-07 17:41:45 +01:00

19 lines
464 B
JavaScript

import { defineConfig } from 'vite'
import eslint from 'vite-plugin-eslint'
// https://vitejs.dev/config
export default defineConfig({
resolve: {
// Some libs that can run in both Web and Node.js, such as `axios`, we need to tell Vite to build them in Node.js.
browserField: false,
conditions: ['node'],
mainFields: ['module', 'jsnext:main', 'jsnext'],
},
plugins: [
eslint({
cache: true,
failOnError: false,
}),
],
})