webpack.config.mjs 518 B

12345678910111213141516171819202122
  1. import * as path from 'path'
  2. import * as url from 'url'
  3. const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
  4. import config from '../webpack.plugin.config.mjs'
  5. export default () => {
  6. const cfg = config({
  7. name: 'terminal',
  8. dirname: __dirname,
  9. externals: [
  10. 'opentype.js',
  11. ],
  12. rules: [
  13. {
  14. test: /lib[\\/]xterm-addon-image-worker.js$/i,
  15. type: 'asset/source',
  16. },
  17. ],
  18. })
  19. return cfg
  20. }