1
0
Fork 0
mirror of https://github.com/Luzifer/password.git synced 2024-11-08 09:20:06 +00:00
password/js/build.mjs

25 lines
493 B
JavaScript
Raw Permalink Normal View History

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',
],
})