-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
34 lines (31 loc) · 834 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
34
const path = require('path');
const { env } = require('process');
const webpack = require('webpack');
/*const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');*/
module.exports = (env, argv) => {
let filename;
switch (env.mode) {
case "development":
filename = "dev"
break;
case "production":
filename = "prod";
break;
default:
filename = "testing"
break;
}
return {
mode: env.mode,
entry: './index.js',
output: {
filename: `bundle.${filename}.js`,
path: path.resolve(__dirname, 'dist'),
library: "Language_Tools",
//libraryExport: "default",
libraryTarget: "this",
globalObject: "this"
}
}
};