36 lines
761 B
JavaScript
36 lines
761 B
JavaScript
import * as esbuild from 'esbuild';
|
|
|
|
import { sassPlugin } from 'esbuild-sass-plugin';
|
|
import svgPlugin from 'esbuild-plugin-svg-bundle';
|
|
import { copy } from 'esbuild-plugin-copy';
|
|
|
|
await esbuild.build({
|
|
plugins: [
|
|
sassPlugin(),
|
|
svgPlugin({
|
|
bundleFile: './svg-bundle.svg',
|
|
bundleUrl: './svg-bundle.svg',
|
|
}),
|
|
copy({
|
|
resolveFrom: 'cwd',
|
|
assets: {
|
|
from: [ './assets/favicons/*' ],
|
|
to: [ './static' ],
|
|
},
|
|
}),
|
|
copy({
|
|
resolveFrom: 'cwd',
|
|
assets: {
|
|
from: [ './config/robots.txt' ],
|
|
to: [ './static' ],
|
|
},
|
|
}),
|
|
],
|
|
entryPoints: [
|
|
'./frontend/src/main.js',
|
|
'./frontend/src/polyfill.js',
|
|
],
|
|
bundle: true,
|
|
minify: true,
|
|
outdir: './static',
|
|
}); |