Skip to content

Commit 340337c

Browse files
authored
feat: add __APP_NAME__ and __APP_DISPLAY_NAME__ (#133)
### Developer Checklist (Definition of Done) **Issue** - [x] All acceptance criteria from the issue are met - [x] Tested in latest Chrome/Firefox **UI/UX/Vis** - [ ] Requires UI/UX/Vis review - [ ] Reviewer(s) are notified (_tag assignees_) - [ ] Review has occurred (_link to notes_) - [ ] Feedback is included in this PR - [ ] Reviewer(s) approve of concept and design **Code** - [x] Branch is up-to-date with the branch to be merged with, i.e., develop - [x] Code is cleaned up and formatted - [ ] Unit tests are written (frontend/backend if applicable) - [ ] Integration tests are written (if applicable) **PR** - [x] Descriptive title for this pull request is provided (will be used for release notes later) - [x] Reviewer and assignees are defined - [x] Add type label (e.g., *bug*, *feature*) to this pull request - [x] Add release label (e.g., `release: minor`) to this PR following [semver](https://semver.org/) - [x] The PR is connected to the corresponding issue (via `Closes #...`) - [x] [Summary of changes](#summary-of-changes) is written ### Summary of changes - Adds the __APP_NAME__ and __APP_DISPLAY_NAME__ properties as env variables from the package.json ### Screenshots ### Additional notes for the reviewer(s) - Thanks for creating this pull request 🤗
1 parent 1822ab8 commit 340337c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

config/rspack.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,8 @@ module.exports = (webpackEnv, argv) => {
385385
}),
386386
new DefinePlugin({
387387
'process.env.NODE_ENV': JSON.stringify(mode),
388+
'process.env.__APP_NAME__': JSON.stringify(appPkg.name),
389+
'process.env.__APP_DISPLAY_NAME__': JSON.stringify(appPkg.displayName || appPkg.name),
388390
'process.env.__VERSION__': JSON.stringify(appPkg.version),
389391
'process.env.__LICENSE__': JSON.stringify(appPkg.license),
390392
'process.env.__BUILD_ID__': JSON.stringify(buildId),

0 commit comments

Comments
 (0)