Skip to content

Commit 7331e30

Browse files
committed
reformat webpack config
1 parent f4e5fb2 commit 7331e30

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

webpack.config.js

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,28 @@ var version = `v${PACKAGE.version}`
77
require('@babel/register')
88
// Webpack Configuration
99
const config = {
10-
// Entry
11-
entry: path.resolve(__dirname, 'index.js'),
12-
// Output
13-
output: {
14-
filename: 'terminusdb-client.min.js',
15-
sourceMapFilename: 'terminusdb-client.min.js.map',
16-
libraryTarget: 'umd',
17-
library: 'TerminusDBClient',
18-
globalObject: 'this',
19-
},
20-
// Loaders
21-
module: {
22-
rules: [
23-
// JavaScript/JSX Files
24-
{
25-
test: /\.js$/,
26-
exclude: /node_modules/,
27-
loader: 'babel-loader',
28-
},
29-
],
30-
},
31-
devtool: 'source-map',
10+
// Entry
11+
entry: path.resolve(__dirname, 'index.js'),
12+
// Output
13+
output: {
14+
filename: 'terminusdb-client.min.js',
15+
sourceMapFilename: 'terminusdb-client.min.js.map',
16+
libraryTarget: 'umd',
17+
library: 'TerminusDBClient',
18+
globalObject: 'this',
19+
},
20+
// Loaders
21+
module: {
22+
rules: [
23+
// JavaScript/JSX Files
24+
{
25+
test: /\.js$/,
26+
exclude: /node_modules/,
27+
loader: 'babel-loader',
28+
},
29+
],
30+
},
31+
devtool: 'source-map',
3232
// Plugins
3333
resolve: {
3434
fallback: {
@@ -38,20 +38,20 @@ const config = {
3838
}
3939

4040
module.exports = function(env, argv) {
41-
if (argv.mode === 'development') {
42-
config.watch = true
43-
}
41+
if (argv.mode === 'development') {
42+
config.watch = true
43+
}
4444

45-
if (argv.mode === 'production') {
46-
config.plugins = [
47-
new HtmlWebPackPlugin({
48-
template: './index.html',
49-
filename: 'index.html',
50-
}),
51-
]
52-
}
45+
if (argv.mode === 'production') {
46+
config.plugins = [
47+
new HtmlWebPackPlugin({
48+
template: './index.html',
49+
filename: 'index.html',
50+
}),
51+
]
52+
}
5353

54-
return config
54+
return config
5555
}
5656

5757
// Exports

0 commit comments

Comments
 (0)