forked from Timofffee/instant-games-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
33 lines (32 loc) · 916 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
const path = require('path')
const webpack = require('webpack')
const ESLintPlugin = require('eslint-webpack-plugin')
const packageJson = require('./package.json')
module.exports = {
entry: './src/index.js',
output: {
filename: 'instant-games-bridge.js',
path: path.resolve(__dirname, 'dist'),
},
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
},
},
},
],
},
plugins: [
new ESLintPlugin(),
new webpack.DefinePlugin({
PLUGIN_VERSION: JSON.stringify(packageJson.version),
PLUGIN_NAME: JSON.stringify(packageJson.name),
}),
],
}