]> git.r.bdr.sh - rbdr/serpentity/blob - config/webpack.js
b213d0c2381c8b91f10367be76cdffff7e75b335
[rbdr/serpentity] / config / webpack.js
1 const Path = require('path');
2 const Webpack = require('webpack');
3
4 module.exports = {
5 entry: {
6 serpentity: './lib/serpentity.js',
7 'serpentity.min': './lib/serpentity.js'
8 },
9
10 output: {
11 path: Path.resolve(__dirname, '../dist'),
12 filename: '[name].js',
13 library: 'Serpentity',
14 libraryTarget: 'umd'
15 },
16
17 module: {
18 rules: [
19 {
20 test: /\.js$/,
21 exclude: /(node_modules|doc)/,
22 use: 'babel-loader'
23 }
24 ]
25 },
26
27 resolve: {
28 modules: [
29 'node_modules',
30 Path.resolve(__dirname, '../lib')
31 ],
32
33 extensions: ['.js']
34 },
35
36 context: Path.resolve(__dirname, '..'),
37
38 optimization: {
39 minimize: true
40 }
41 };