funquail/front/vite.config.ts
wvffle f06c040b50 Add markdown enhancements
This commit will bring:
- Linking to other users with `@username`
- Linking to tags with `#tag`
- Opening external links in new tab (Fix #1647)
- Single line breaks to avoid confusion for non-technical users (Fix #1377)
- 😒 support...
- Email encoding in markdown
- Markdown editor now auto-resizes to accomodate content (Fix #1379)

NOTE: This only works in very few places. We need to wait for #1835 to have those features available widely
2022-09-06 09:26:36 +00:00

58 lines
1.2 KiB
TypeScript

import { defineConfig } from 'vite'
import Vue from '@vitejs/plugin-vue'
import Inspector from 'vite-plugin-vue-inspector'
import { VitePWA } from 'vite-plugin-pwa'
import { resolve } from 'path'
const port = +(process.env.VUE_PORT ?? 8080)
// https://vitejs.dev/config/
export default defineConfig(() => ({
envPrefix: 'VUE_',
plugins: [
// https://github.com/underfin/vite-plugin-vue2
Vue({
template: {
compilerOptions: {
compatConfig: {
MODE: 2
}
}
}
}),
// https://github.com/webfansplz/vite-plugin-vue-inspector
Inspector({
toggleComboKey: 'alt-shift-d'
}),
// https://github.com/antfu/vite-plugin-pwa
VitePWA({
strategies: 'injectManifest',
srcDir: 'src',
filename: 'serviceWorker.ts',
manifestFilename: 'manifest.json',
devOptions: {
enabled: true,
type: 'module',
navigateFallback: 'index.html'
}
})
],
server: {
port
},
resolve: {
alias: {
'~': resolve(__dirname, './src')
}
},
build: {
rollupOptions: {
input: {
main: resolve(__dirname, './index.html'),
embed: resolve(__dirname, './embed.html')
}
}
}
}))