diff --git a/config-overrides.js b/config-overrides.js index af26d75..4b7adbe 100644 --- a/config-overrides.js +++ b/config-overrides.js @@ -31,7 +31,11 @@ module.exports = function override(config, env) { config.plugins.push( new webpack.ProvidePlugin({ Buffer: ["buffer", "Buffer"], - }) + }), + require("@import-meta-env/unplugin").webpack({ + example: ".env.example", + env: ".env", + }), ) config.module.rules.push({ diff --git a/package.json b/package.json index 8d8b52d..862ee0a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "web-wallet", - "version": "0.1.5", + "version": "0.1.6", "private": true, "dependencies": { "@cerc-io/registry-sdk": "^0.2.5", @@ -52,6 +52,7 @@ "scripts": { "start": "react-app-rewired start", "build": "react-app-rewired build", + "set-env": "import-meta-env -x .env.example -p build/index.html", "test": "react-app-rewired test", "lint": "eslint .", "prepare": "husky", @@ -77,6 +78,9 @@ }, "devDependencies": { "@babel/plugin-transform-modules-commonjs": "^7.24.8", + "@import-meta-env/cli": "^0.7.3", + "@import-meta-env/typescript": "^0.4.0", + "@import-meta-env/unplugin": "^0.6.2", "@types/json-bigint": "^1.0.4", "@types/lodash": "^4.17.7", "@types/node": "^16.7.13", @@ -85,6 +89,7 @@ "@typescript-eslint/eslint-plugin": "^6.13.2", "@typescript-eslint/parser": "^6.13.2", "crypto-browserify": "^3.12.0", + "dotenv": "^16.5.0", "eslint": "^8.3.0", "eslint-config-react-app": "^7.0.1", "eslint-plugin-react": "^7.33.2", @@ -92,5 +97,6 @@ "husky": "^9.0.11", "react-app-rewired": "^2.2.1", "stream-browserify": "^3.0.0" - } + }, + "packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447" } diff --git a/public/index.html b/public/index.html index f863862..25b8db1 100644 --- a/public/index.html +++ b/public/index.html @@ -28,6 +28,9 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Laconic Wallet +