Skip to content

Commit 42ad0ec

Browse files
committed
Webpack config file updated
1 parent fb737ba commit 42ad0ec

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
88
"server-start": "node -r dotenv/config server/services/graphqlService.js dotenv_config_path=server/.env",
9-
"client-build": "webpack --mode production",
10-
"client-dev": "webpack --mode development",
9+
"client-build": "node_modules/.bin/webpack --mode production --config ./public/webpack.config.js",
10+
"client-dev": "node_modules/.bin/webpack --mode development --config ./public/webpack.config.js",
1111
"client-start": "node_modules/.bin/http-server ./public/dist -c-1"
1212
},
1313
"keywords": [],

public/src/Constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const Constants = () => {
22
return {
33
GRAPHQL_URL:
4-
"https://4j844x5vu5.execute-api.ap-south-1.amazonaws.com/graphql",
4+
"http://localhost:4000/graphql",
55
};
66
};
77

public/webpack.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1+
const path = require("path");
2+
console.log("Path in webpack config file", __dirname);
3+
14
module.exports = {
5+
// Context is most important when running webpack from package.json outside ./public
6+
context: path.resolve(__dirname, "./src"),
7+
28
devtool: "source-map",
9+
entry: "./index.js",
310
output: {
11+
path: path.join(__dirname, "./dist"),
412
assetModuleFilename: "images/[name][ext][query]",
513
},
614
module: {

0 commit comments

Comments
 (0)