~rbdr/serpentity

ref: 0175290596f12226a69cda815ad1c73b0f43d898 serpentity/config/webpack.cjs -rw-r--r-- 651 bytes
01752905 — Ben Beltran Merge branch 'hotfix/3.0.2' 2 years ago
                                                                                
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
32
33
34
35
36
37
38
39
40
const Path = require('path');

module.exports = {
  entry: {
    serpentity: './lib/serpentity.js',
    'serpentity.min': './lib/serpentity.js'
  },

  output: {
    path: Path.resolve(__dirname, '../dist'),
    filename: '[name].js',
    library: 'Serpentity',
    libraryTarget: 'umd'
  },

  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /(node_modules|doc)/,
        use: 'babel-loader'
      }
    ]
  },

  resolve: {
    modules: [
      'node_modules',
      Path.resolve(__dirname, '../lib')
    ],

    extensions: ['.js']
  },

  context: Path.resolve(__dirname, '..'),

  optimization: {
    minimize: true
  }
};