mirror of
https://github.com/knadh/listmonk.git
synced 2024-11-14 11:36:51 +08:00
af8b420d53
- Upgrade eslint and fix a massive number (~2500!) of linting errors from new rules. - Upgrade babel core frontend dev dependency. - Upgrade UI lib and other frontend deps. - Refactor the Vue admin app to use `vite` instead of `webpack`. - This was an extremely tedious and painstaking, trial-and-error alchemy job. My disdain for the Javascript "ecosystem" grows. - Re-add custom admin appearance endpoints to the refactored Vue page. - Remove obsolete vue-cli config. - Re-auto-format all .vue files again to work with new linters.
37 lines
948 B
JavaScript
Vendored
37 lines
948 B
JavaScript
Vendored
import vue from '@vitejs/plugin-vue2';
|
|
import { defineConfig, loadEnv } from 'vite';
|
|
|
|
const path = require('path');
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig(({ _, mode }) => {
|
|
const env = loadEnv(mode, process.cwd(), '');
|
|
return {
|
|
plugins: [vue()],
|
|
base: '/admin',
|
|
mode,
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
bulma: require.resolve('bulma/bulma.sass'),
|
|
},
|
|
},
|
|
build: {
|
|
assetsDir: 'static',
|
|
},
|
|
server: {
|
|
port: env.LISTMONK_FRONTEND_PORT || 8080,
|
|
proxy: {
|
|
'^/$': {
|
|
target: env.LISTMONK_API_URL || 'http://127.0.0.1:9000',
|
|
},
|
|
'^/(api|webhooks|subscription|public|health)': {
|
|
target: env.LISTMONK_API_URL || 'http://127.0.0.1:9000',
|
|
},
|
|
'^/(admin\/custom\.(css|js))': {
|
|
target: env.LISTMONK_API_URL || 'http://127.0.0.1:9000',
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|