Skip to content

Commit 8ca1b9f

Browse files
author
Nikolaos Veneti
committed
build dev pointing to local enviroment
1 parent 31203b1 commit 8ca1b9f

File tree

1 file changed

+31
-21
lines changed

1 file changed

+31
-21
lines changed

webpack.dev.js

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
1-
const path = require("path");
1+
const path = require('path');
22

33
module.exports = {
4-
mode: "development",
5-
entry: path.join(__dirname, "/lib"),
6-
resolve: {
7-
extensions: [".js"]
8-
},
9-
module: {
10-
rules: [
11-
{
12-
test: /\.js$/,
13-
use: {
14-
loader: "babel-loader"
15-
}
16-
}
17-
]
18-
},
19-
output: {
20-
library: "analytics",
21-
libraryTarget: "umd",
22-
filename: "analytics.js"
23-
}
4+
mode: 'development',
5+
entry: path.join(__dirname, '/lib'),
6+
resolve: {
7+
extensions: ['.js']
8+
},
9+
module: {
10+
rules: [
11+
{
12+
test: /\.js$/,
13+
use: {
14+
loader: 'babel-loader'
15+
}
16+
},
17+
{
18+
test: /\.js$/,
19+
loader: 'string-replace-loader',
20+
options: {
21+
multiple: [
22+
{ search: 'api.dreamdata.cloud/v1', replace: 'localhost:8080/v1' },
23+
{ search: 'https://', replace: 'http://' }
24+
]
25+
}
26+
}
27+
]
28+
},
29+
output: {
30+
library: 'analytics',
31+
libraryTarget: 'umd',
32+
filename: 'analytics.js'
33+
}
2434
};

0 commit comments

Comments
 (0)