Open your website by double-clicking the index.html locally without a file server.
npm install vite-plugin-support-file
Add to your Vite config:
// vite.config.js
import { defineConfig } from 'vite';
import supportFile from 'vite-plugin-support-file';
export default defineConfig({
plugins: [
supportFile()
]
});
npm run build
Enjoy~
- change Rollup output format to
systemjs
- inject
s.min.js
into index.html