mirror of
https://github.com/morgan9e/chatgpt-web
synced 2026-04-14 00:14:04 +09:00
Fix #36 - added ESlint config with ts-standard + svelte support
This commit is contained in:
@@ -1,28 +1,28 @@
|
||||
import { defineConfig } from "vite";
|
||||
import { svelte } from "@sveltejs/vite-plugin-svelte";
|
||||
import { defineConfig } from 'vite'
|
||||
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
||||
|
||||
import purgecss from "@fullhuman/postcss-purgecss";
|
||||
import purgecss from '@fullhuman/postcss-purgecss'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig(({ command, mode, ssrBuild }) => {
|
||||
// Only run PurgeCSS in production builds
|
||||
if (command === "build") {
|
||||
if (command === 'build') {
|
||||
return {
|
||||
plugins: [svelte()],
|
||||
css: {
|
||||
postcss: {
|
||||
plugins: [
|
||||
purgecss({
|
||||
content: ["./**/*.html", "./**/*.svelte"],
|
||||
safelist: ["pre", "code"],
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
content: ['./**/*.html', './**/*.svelte'],
|
||||
safelist: ['pre', 'code']
|
||||
})
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
plugins: [svelte()],
|
||||
};
|
||||
plugins: [svelte()]
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user