UNPKG

937 BJavaScriptView Raw
1/* global __dirname, require, module*/
2
3const webpack = require('webpack');
4const path = require('path');
5
6let libraryName = 'js2flowchart';
7
8let plugins = [], outputFile;
9
10outputFile = libraryName + '.js';
11
12const config = {
13 entry: __dirname + '/index.js',
14 devtool: 'source-map',
15 output: {
16 path: __dirname + '/dist',
17 filename: outputFile,
18 library: libraryName,
19 libraryTarget: 'umd',
20 umdNamedDefine: true
21 },
22 module: {
23 rules: [
24 {
25 test: /(\.jsx|\.js)$/,
26 loader: 'babel-loader',
27 exclude: /(node_modules|bower_components)/
28 }
29 ]
30 },
31 resolve: {
32 modules: [
33 path.resolve('./node_modules'), path.resolve('./src'),
34 path.resolve('./src/shared'), path.resolve('./src/render'),
35 path.resolve('./src/builder'), path.resolve('./src/presentation-generator')
36 ],
37 extensions: ['.json', '.js']
38 },
39 plugins: plugins
40};
41
42module.exports = config;