1
0
Fork 0
mirror of https://github.com/Luzifer/share.git synced 2024-11-08 14:50:09 +00:00
share/ci/build.mjs
Knut Ahlers 549f0d1f36
Port frontend to Vue 3 / Bootstrap 5.3
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2024-03-18 20:22:31 +01:00

34 lines
654 B
JavaScript

import esbuild from 'esbuild'
import { sassPlugin } from 'esbuild-sass-plugin'
import vuePlugin from 'esbuild-plugin-vue3'
const buildOpts = {
assetNames: '[name]-[hash]',
bundle: true,
define: {
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'dev'),
},
entryPoints: ['frontend-src/main.ts'],
legalComments: 'none',
loader: {
'.ttf': 'file',
'.woff2': 'file',
},
minify: true,
outfile: 'frontend/app.js',
plugins: [
sassPlugin(),
vuePlugin(),
],
target: [
'chrome109',
'edge116',
'es2020',
'firefox115',
'safari15',
],
}
export { buildOpts }
esbuild.build(buildOpts)