File size: 616 Bytes
4d70170
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const path = require('node:path')
const { createConfig } = require('@vue-devtools/build-tools')

const target = {
  chrome: 52,
  firefox: 48,
  safari: 9,
  ie: 11,
}

module.exports = createConfig({
  target: 'node',
  externals: {
    // from https://socket.io/docs/v4/client-with-bundlers/
    'bufferutil': 'bufferutil',
    'utf-8-validate': 'utf-8-validate',
  },
  entry: {
    devtools: './src/devtools.js',
    backend: './src/backend.js',
    hook: './src/hook.js',
  },
  output: {
    path: path.join(__dirname, '/build-node'),
    publicPath: '/build-node/',
    filename: '[name].js',
  },
}, target)