-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: configure webpack-dev-server for independent frontend development [reboot of #1999] #2207
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
base: develop
Are you sure you want to change the base?
feat: configure webpack-dev-server for independent frontend development [reboot of #1999] #2207
Conversation
…y serve editor and preview (Fix processing#1348)
…ed due to phishing
…th the release preview script
…eriment/webpack-dev-server # Conflicts: # client/modules/IDE/components/ShareModal.jsx # contributor_docs/development.md # package-lock.json # package.json # server/routes/embed.routes.js # server/routes/redirectEmbed.routes.js
Hmm...hold off on merging this. Turns out that it interferes with the normal |
Thanks so much for looking into this and bringing this up to date with the latest code @lindapaiste !
What if we put the dev server templates into a different folder, like Some people may want to use the existing dev server because they want to run the rest of the backend stack, but this "local-first" option should hopefully make life easier for those whose changes really don't depend on anything from the backend. |
Fixes #1348
Credit for this code goes to @hydrosquall's PR #1999.
Changes:
I merged the current
develop
branch into that branch and fixed the conflicts.I also made some changes to how the vars are passed from the config to the
index.html
to ensure that we getboolean
true
/false
values instead of string'true'
. It's possible to inject the variables directly into the<script>
withwindow.process.env = <%= ENV_FROM_WEBPACK %>
but that is a syntax error if the file is accessed directly. It seemed safer to place the variables into an HTML property and read from the HTML to the JS, so that's what I did.This development environment can only load the IDE and cannot handle login, saving, or even viewing the p5 examples. The next step will be to interact with with an API from the production site or a staging site. I see that PR #1398 was merged in order to allow this, but I'm still getting CORS errors 🤷
I have verified that this pull request:
npm run lint
)npm run test
)develop
branch.Fixes #123