2018-04-05 18:54:58 +02:00
|
|
|
/* eslint-disable import/no-commonjs */
|
2018-01-11 12:54:20 +01:00
|
|
|
const path = require('path');
|
2019-02-22 08:02:20 +01:00
|
|
|
const FlowWebpackPlugin = require('flow-webpack-plugin');
|
2018-04-05 18:54:58 +02:00
|
|
|
|
2018-01-11 12:54:20 +01:00
|
|
|
module.exports = {
|
2018-04-05 18:54:58 +02:00
|
|
|
mode: 'none',
|
2018-01-11 12:54:20 +01:00
|
|
|
entry: './src/index.js',
|
|
|
|
output: {
|
2018-04-05 18:54:58 +02:00
|
|
|
filename: 'bundle.js',
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
2019-02-18 15:11:32 +01:00
|
|
|
libraryTarget: 'umd',
|
2019-02-22 08:02:20 +01:00
|
|
|
globalObject: `(typeof self !== 'undefined' ? self : this)`,
|
2018-01-11 12:54:20 +01:00
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
2018-04-05 18:54:58 +02:00
|
|
|
exclude: /node_modules/,
|
|
|
|
loader: 'babel-loader',
|
|
|
|
},
|
|
|
|
],
|
2018-01-11 12:54:20 +01:00
|
|
|
},
|
|
|
|
resolve: {
|
2018-04-05 18:54:58 +02:00
|
|
|
modules: [path.resolve(__dirname, 'src'), 'node_modules'],
|
2018-01-11 12:54:20 +01:00
|
|
|
},
|
2018-07-25 03:05:31 +02:00
|
|
|
plugins: [new FlowWebpackPlugin()],
|
2018-01-11 12:54:20 +01:00
|
|
|
};
|