esbuild.config.js 654 B

12345678910111213141516171819202122232425
  1. 'use strict'
  2. const esbuild = require('esbuild')
  3. const { getTarget } = require('./getTarget')
  4. const pkg = require('../../package')
  5. const year = new Date().getFullYear()
  6. const banner = `/*!
  7. * AdminLTE v${pkg.version} (${pkg.homepage})
  8. * Copyright 2014-${year} ${pkg.author}
  9. * Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE)
  10. */`
  11. esbuild.build({
  12. entryPoints: ['build/ts/adminlte.ts'],
  13. bundle: true,
  14. minify: false,
  15. sourcemap: true,
  16. banner: {
  17. js: banner
  18. },
  19. target: getTarget(['es', 'chrome', 'edge', 'firefox', 'ios', 'safari']),
  20. outfile: 'dist/js/adminlte.js'
  21. }).catch(error => console.error(error))