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