-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: configure webpack-dev-server for independent frontend development #1999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: configure webpack-dev-server for independent frontend development #1999
Conversation
…y serve editor and preview (Fix processing#1348)
…ed due to phishing
Release EnvironmentsThis pull request environment is provided by Release, learn more! 🔧Environment Status : https://app.releasehub.com/public/Processing%20Foundation/env-95c3decd04 |
@@ -0,0 +1 @@ | |||
12.16.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on #1308
screen, | ||
within | ||
} from './test-utils'; | ||
import { reduxRender, act, waitFor, screen, within } from './test-utils'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lint requested the removal of fireEvent
@@ -131,7 +132,8 @@ | |||
"storybook-addon-theme-playground": "^1.2.0", | |||
"style-loader": "^2.0.0", | |||
"terser-webpack-plugin": "^4.2.3", | |||
"webpack-cli": "^4.4.0", | |||
"webpack-cli": "^4.9.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumped this version because of symfony/webpack-encore#1069 (comment) .
window.process.env = {}; | ||
} | ||
|
||
window.process.env.API_URL = '<%= htmlWebpackPlugin.options.API_URL %>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax for variable interpolation comes from https://lodash.com/docs/4.17.15#template . Using other templating languages (ejs, handelbars, etc) would have required installing another loader.
…th the release preview script
@catarak which port does the preview app usually run on? It looks like |
Thank you so much for all of your efforts and for taking the time to contribute to this issue—I'm so sorry we couldn't get to your work in time! Since some time has passed I'm going to close this for now, but please feel free to reopen this or work on this again, thanks! |
Motivation
p5.js-web-editor
without needing to run a full node server + databaseChanges
webpack-dev-server
dependency + upgradedwebpack-cli
lodash.template
templatesindex.html
andpreview.html
for the two primary routes needed for the app's functionality. Populates with the environment variables through the samedotenv
configuration path as the server. Omits some of the variables that seemed unrelated to frontend development.Testing
Try running this locally:
Checklist
npm run lint
)develop
branch. (If I was asked to make more changes, I have made sure to rebase ontodevelop
then too)Fixes #123