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