Skip to content
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

bugfix(demo):fix demo build webpack config #293 #294

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lari-ks
Copy link

@lari-ks lari-ks commented Jan 28, 2025

Fix for demo build - i was unable to run locally

Demo loaded html page with no javascript, it was broken for a few different reasons.
I made 3 changes to fix this.

  1. cross-env added so Windows users can run also (cross-env link)
  2. small change to webpack config to build html in /build and add script automatically, so script can be removed
  3. using ./node-modules/webpack/.bin/webpack is OS incompatible so i added a webpack script:

webpack serve --config ./examples/webpack.config.js --mode development
this ensures webpack runs correctly for whatever environment its being run in as opposed to ./node-modules/webpack/.bin/webpack which won't.

Now npm run demo or npm run start works and displays/runs the demo, and doesn't show a html page with no javascript anymore

All tests pass.

Fixes #293

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Demo
1 participant