@a-tech.jo/atech_payment 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/webpack.config.js +35 -34
package/package.json
CHANGED
package/webpack.config.js
CHANGED
|
@@ -5,42 +5,43 @@ import Dotenv from "dotenv-webpack";
|
|
|
5
5
|
const isProduction = process.env.NODE_ENV === "production";
|
|
6
6
|
|
|
7
7
|
const config = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
8
|
+
entry: "./index.js",
|
|
9
|
+
output: {
|
|
10
|
+
path: path.resolve("build"),
|
|
11
|
+
filename: "index.js",
|
|
12
|
+
},
|
|
13
|
+
devServer: {
|
|
14
|
+
open: true,
|
|
15
|
+
host: "localhost",
|
|
16
|
+
},
|
|
17
|
+
module: {
|
|
18
|
+
rules: [
|
|
19
|
+
{
|
|
20
|
+
test: /\.(js|jsx)$/i,
|
|
21
|
+
exclude: /node_modules\/(?!@a-tech.jo\/atech_payment)/,
|
|
22
|
+
loader: "babel-loader",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i,
|
|
26
|
+
type: "asset",
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
plugins: [
|
|
31
|
+
new Dotenv({
|
|
32
|
+
path: "./.env",
|
|
33
|
+
// Use `true` for production mode (only load .env)
|
|
34
|
+
// Use `false` for development mode (load .env and .env.local)
|
|
35
|
+
safe: isProduction ? true : false,
|
|
36
|
+
}),
|
|
27
37
|
],
|
|
28
|
-
},
|
|
29
|
-
plugins: [
|
|
30
|
-
new Dotenv({
|
|
31
|
-
path: "./.env",
|
|
32
|
-
// Use `true` for production mode (only load .env)
|
|
33
|
-
// Use `false` for development mode (load .env and .env.local)
|
|
34
|
-
safe: isProduction ? true : false,
|
|
35
|
-
}),
|
|
36
|
-
],
|
|
37
38
|
};
|
|
38
39
|
|
|
39
40
|
export default () => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
if (isProduction) {
|
|
42
|
+
config.mode = "production";
|
|
43
|
+
} else {
|
|
44
|
+
config.mode = "development";
|
|
45
|
+
}
|
|
46
|
+
return config;
|
|
46
47
|
};
|