Looks like this plugin is incompatible with the @vitejs/plugin-legacy
plugin. When running vite build
I get the following error:
[mix] ENOENT: no such file or directory, open '/home/.../web-builder/dist/index.html'
error during build:
Error: ENOENT: no such file or directory, open '/home/.../web-builder/dist/index.html'
at Object.openSync (node:fs:585:3)
at Object.readFileSync (node:fs:453:35)
at Object.writeBundle (/home/.../web-builder/node_modules/vite-plugin-mix/dist/index.js:954:48)
vite.config.js
:
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import legacy from '@vitejs/plugin-legacy';
import mix from 'vite-plugin-mix';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react({
jsxImportSource: '@emotion/react',
babel: {
plugins: ['@emotion/babel-plugin'],
},
}),
legacy({
targets: ['ie >= 11'],
additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
}),
mix({
handler: './server/server.js',
}),
],
});
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too