| 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
30
31
 | | const path = require('path'); |  | const packageName = require('../package.json').name; |  | const { getWebpackVersion } = require('../lib/utils'); |  |   |  | const webpackVersion = getWebpackVersion(); |  |   |  | const config = { |  |   output: { |  |     filename: '[name].js' |  |   }, |  |   |  |   devtool: false, |  |   |  |   resolve: { |  |     alias: { |  |       [packageName]: path.resolve(__dirname, '..') |  |     } |  |   }, |  |   |  |   resolveLoader: { |  |     alias: { |  |       [packageName]: path.resolve(__dirname, '..') |  |     } |  |   } |  | }; |  |   |  | if (webpackVersion >= 4) { |  |   config.mode = 'development'; |  | } |  |   |  | module.exports = config; | 
 |