feat: add fedx-scripts serve#404
Merged
Merged
Conversation
adamstankiewicz
commented
Jun 26, 2023
| "@babel/preset-react": "7.22.5", | ||
| "@edx/eslint-config": "3.2.0", | ||
| "@edx/new-relic-source-map-webpack-plugin": "2.1.0", | ||
| "@fullhuman/postcss-purgecss": "^5.0.0", |
Member
Author
There was a problem hiding this comment.
Pins some dependencies, since majority of dependencies are pinned.
183f5a0 to
c756d23
Compare
brobro10000
previously approved these changes
Jun 27, 2023
davidjoy
reviewed
Jun 27, 2023
| @@ -1,4 +1,7 @@ | |||
| #!/usr/bin/env node | |||
|
|
|||
| const chalk = require('chalk'); | |||
davidjoy
reviewed
Jun 27, 2023
a4bd289
a5786ed to
c48e0f2
Compare
Member
Author
|
@davidjoy @brobro10000 I've updated this PR to add support for finding |
brobro10000
previously approved these changes
Jul 18, 2023
Comment on lines
+9
to
+18
| // Add process env vars. Currently used only for setting the | ||
| // server port and the publicPath | ||
| dotenv.config({ | ||
| path: path.resolve(process.cwd(), '.env.development'), | ||
| }); | ||
|
|
||
| // Allow private/local overrides of env vars from .env.development for config settings | ||
| // that you'd like to persist locally during development, without the risk of checking | ||
| // in temporary modifications to .env.development. | ||
| resolvePrivateEnvConfig('.env.private'); |
Member
There was a problem hiding this comment.
🥳 , but good stepping stone to transition over to env.config.js
|
🎉 This PR is included in version 12.9.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
muselesscreator
pushed a commit
that referenced
this pull request
Aug 1, 2023
* feat: add serve command to fedx-scripts to run production bundle * docs: add ADR about serve command * feat: support .env.development and .env.private * docs: update ADR to include .env* support * chore: update package-lock.json take 3 * chore: pin express devDep
muselesscreator
pushed a commit
that referenced
this pull request
Aug 7, 2023
* feat: add serve command to fedx-scripts to run production bundle * docs: add ADR about serve command * feat: support .env.development and .env.private * docs: update ADR to include .env* support * chore: update package-lock.json take 3 * chore: pin express devDep
muselesscreator
pushed a commit
that referenced
this pull request
Aug 31, 2023
* feat: add serve command to fedx-scripts to run production bundle * docs: add ADR about serve command * feat: support .env.development and .env.private * docs: update ADR to include .env* support * chore: update package-lock.json take 3 * chore: pin express devDep
muselesscreator
pushed a commit
that referenced
this pull request
Aug 31, 2023
* feat: add serve command to fedx-scripts to run production bundle * docs: add ADR about serve command * feat: support .env.development and .env.private * docs: update ADR to include .env* support * chore: update package-lock.json take 3 * chore: pin express devDep
muselesscreator
pushed a commit
that referenced
this pull request
Aug 31, 2023
* feat: add serve command to fedx-scripts to run production bundle * docs: add ADR about serve command * feat: support .env.development and .env.private * docs: update ADR to include .env* support * chore: update package-lock.json take 3 * chore: pin express devDep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
These changes propose adding a
servecommand to thefedx-scriptsCLI such that consumers can create an NPM script to serve the production Webpack build from the generateddistdirectory when runningnpm run build. By serving the production build locally, engineers can have more confidence in their resulting production builds before it reaches a staging/production environment.As is, there is no documented way to preview a production build of micro-frontends of the files in the
distdirectory. Simply opening theindex.htmldoes not work as the React routing breaks, amongst other issues.The proposed
servecommand starts an Express.js serve running on thePORTsetting defined inenv.config.js. Note: the.env*files to configuration is now deprecated so theservecommand is intentionally not supporting it.ADR
README documentation