Skip to content

Commit 551985f

Browse files
author
Lucas
authored
Merge pull request #892 from input-output-hk/feat/lw-9219-nami-production-build-command-not-working
[LW-9219] Production build command not working
2 parents 5071517 + edef1fc commit 551985f

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
Nami is a browser based wallet extension to interact with the Cardano blockchain. It's an open-source project and built by [**Berry Pool**](https://pipool.online).
66

7-
87
### Testnet
98

109
[Download testnet version](./build.zip)
@@ -213,7 +212,12 @@ The `project_id` for API requests can be created under [blockfrost.io](https://b
213212

214213
**Recommended:** Follow this [approach](https://github.com/lxieyang/chrome-extension-boilerplate-react#secrets) in order to keep the keys seperate from the repository.
215214

216-
The quick solution is to go under `./src/config/provider.js` and replace `secrets.PROJECT_ID_MAINNET` and `secrets.PROJECT_ID_TESTNET` with the project ids from blockfrost.
215+
```
216+
# Update secrets file with your own keys
217+
cp secrets.testing.js secrets.development.js
218+
```
219+
220+
The quick solution is to go under `./src/config/provider.js` and replace `secrets.PROJECT_ID_MAINNET`, `secrets.PROJECT_ID_TESTNET`, `secrets.PROJECT_ID_PREVIEW` and `secrets.PROJECT_ID_PREPROD` with the project ids from blockfrost.
217221

218222
##### Requirements
219223

@@ -222,12 +226,16 @@ The quick solution is to go under `./src/config/provider.js` and replace `secret
222226
##### Start development server
223227

224228
```
229+
# Update secrets file with your own keys
230+
cp secrets.testing.js secrets.development.js
225231
npm start
226232
```
227233

228234
##### Create production build
229235

230236
```
237+
# Update secrets file with your own keys
238+
cp secrets.testing.js secrets.production.js
231239
npm run build
232240
```
233241

secrets.testing.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
export default {
22
PROJECT_ID_MAINNET: 'DUMMY_MAINNET',
33
PROJECT_ID_TESTNET: 'DUMMY_TESTNET',
4+
PROJECT_ID_PREVIEW: 'DUMMY_PREVIEW',
5+
PROJECT_ID_PREPROD: 'DUMMY_PREPROD',
46
};

utils/build.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ delete config.chromeExtensionBoilerplate;
1010

1111
config.mode = 'production';
1212

13-
webpack(config, function (err) {
14-
if (err) throw err;
13+
webpack(config, function (err, stats) {
14+
if (stats.hasErrors()) {
15+
console.log(
16+
stats.toString({
17+
colors: true,
18+
})
19+
);
20+
}
21+
22+
if (err) {
23+
throw err;
24+
}
1525
});

0 commit comments

Comments
 (0)