Skip to content

Commit

Permalink
Update vite.config.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
YU000jp committed Oct 30, 2023
1 parent 7b4d8ce commit 283a29a
Showing 1 changed file with 10 additions and 23 deletions.
33 changes: 10 additions & 23 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
import { defineConfig } from 'vite';
import { string } from 'rollup-plugin-string';
import logseqDevPlugin from 'vite-plugin-logseq';
import { defineConfig } from "vite";
import logseqDevPlugin from "vite-plugin-logseq";

export default defineConfig(({ command, mode, ssrBuild }) => {
const forProd = mode === 'production';

return {
plugins: [
// Makes HMR available for development
logseqDevPlugin(),
{
...string({
include: '**/*.css',
}),
enforce: 'pre',
},
],
build: {
sourcemap: !forProd,
target: 'esnext',
minify: forProd ? 'esbuild' : false,
},
};
// https://vitejs.dev/config/
export default defineConfig({
plugins: [logseqDevPlugin()],
// Makes HMR available for development
build: {
target: "esnext",
minify: "esbuild",
},
});

0 comments on commit 283a29a

Please sign in to comment.