forked from arantes555/colz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
42 lines (41 loc) · 1003 Bytes
/
webpack.config.js
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
41
42
const path = require('path');
// import path from 'path';
const webpack = require('webpack');
module.exports = {
optimization: {
minimize: false,
},
entry: {
colz: path.join(__dirname, './src/colz.js'),
},
output: {
path: path.join(__dirname, './dist'),
filename: '[name].js',
// @see https://webpack.js.org/guides/author-libraries/
// https://medium.com/@albertogasparin/fixing-export-default-on-webpack-when-bundling-a-library-2fd7af010b26
library: {
name: 'colz',
type: 'umd',
},
},
plugins: [],
resolve: {
extensions: ['.js'],
},
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components|test)/,
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react'],
plugins: [
'@babel/plugin-transform-runtime',
'@babel/plugin-proposal-class-properties',
],
},
},
],
},
};