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