ots/ci/build.mjs
Knut Ahlers d3ca12fa35
Switch to esbuild & NodeJS 18
- Replace Axios with `fetch` api
- Update dependencies

Signed-off-by: Knut Ahlers <knut@ahlers.me>
2023-06-10 16:20:46 +02:00

28 lines
531 B
JavaScript

import { sassPlugin } from 'esbuild-sass-plugin'
import vuePlugin from 'esbuild-vue'
import esbuild from 'esbuild'
esbuild.build({
assetNames: '[name]',
bundle: true,
define: {
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'dev'),
},
entryPoints: ['src/main.js'],
loader: {
'.woff2': 'file',
},
minify: true,
outfile: 'frontend/app.js',
plugins: [
sassPlugin(),
vuePlugin(),
],
target: [
'chrome87',
'edge87',
'es2020',
'firefox84',
'safari14',
],
})