@@ -7,28 +7,28 @@ var version = `v${PACKAGE.version}`
7
7
require ( '@babel/register' )
8
8
// Webpack Configuration
9
9
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 : / \. j s $ / ,
26
- exclude : / n o d e _ m o d u l e s / ,
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 : / \. j s $ / ,
26
+ exclude : / n o d e _ m o d u l e s / ,
27
+ loader : 'babel-loader' ,
28
+ } ,
29
+ ] ,
30
+ } ,
31
+ devtool : 'source-map' ,
32
32
// Plugins
33
33
resolve : {
34
34
fallback : {
@@ -38,20 +38,20 @@ const config = {
38
38
}
39
39
40
40
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
+ }
44
44
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
+ }
53
53
54
- return config
54
+ return config
55
55
}
56
56
57
57
// Exports
0 commit comments