diff --git a/vite.config.js b/vite.config.js
index 32100fb..86ca06e 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -3,10 +3,16 @@ import viteImagemin from 'vite-plugin-imagemin'
export default defineConfig({
root: 'src',
+ base: './',
build: {
outDir: '../dist',
emptyOutDir: true,
assetsDir: 'assets',
+ rollupOptions: {
+ output: {
+ format: 'iife',
+ },
+ },
},
server: {
port: 3000,
@@ -20,6 +26,14 @@ export default defineConfig({
},
},
plugins: [
+ {
+ name: 'remove-module-attrs',
+ transformIndexHtml(html) {
+ return html
+ .replace(/ type="module"/g, '')
+ .replace(/ crossorigin/g, '')
+ },
+ },
viteImagemin({
gifsicle: { optimizationLevel: 3 },
optipng: { optimizationLevel: 5 },