lbry-redux/webpack.config.js

28 lines
633 B
JavaScript
Raw Normal View History

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'),
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
},
plugins: [new FlowWebpackPlugin()],
2018-01-11 12:54:20 +01:00
};