webpack.config.js
'use strict'
process.env.BABEL_ENV = 'main'
const path = require('path')
const webpack = require('webpack')
let mainConfig = {
entry: path.resolve(__dirname, 'src/index.js'),
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js',
library: 'mcpyver',
libraryTarget: 'commonjs2'
},
target: 'node',
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.js$/,
loader: 'eslint-loader',
exclude: /node_modules/
}
]
}
}
module.exports = mainConfig