1
0
Fork 0
mirror of https://github.com/Luzifer/password.git synced 2024-11-09 01:40:04 +00:00
password/js/build.mjs
Knut Ahlers ac72a04c53
Move JS build to esbuild / resolve vulnerabilities
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2022-06-27 21:36:28 +02:00

24 lines
493 B
JavaScript

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