Fix: Configure webpack and update image target assets to make example work#2
Open
tkada wants to merge 7 commits into8thwall:mainfrom
Open
Fix: Configure webpack and update image target assets to make example work#2tkada wants to merge 7 commits into8thwall:mainfrom
tkada wants to merge 7 commits into8thwall:mainfrom
Conversation
- Add src/targets to resolve.modules so target files can be required without path prefix - Serve src/targets at /targets, /image-targets, and / via devServer.static - Exclude .json files from asset-loader to allow webpack native JSON parsing - Fix require paths in app.js to use short module names Made-with: Cursor
AA-Nassim
approved these changes
Apr 5, 2026
There was a problem hiding this comment.
Thanks for the fix, worked great for me !
One small note: since this version now uses HTTPS in the dev server, is step 5 in the README ("To connect to a mobile device, follow these instructions") still relevant? It might be worth revisiting or removing it to avoid confusion.
Edit : Or maybe go back to HTTP and keep the connect to mobile instructions for more consistency across the tutorials. Both seem good to me ¯\_(ツ)_/¯
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.
Problem
The example was not working due to incorrect image target asset configuration and webpack setup.
Changes
asset/sourcetype.jsonfiles for image targets.jsto.jsonformat (model-target and video-target)src/app.jsto properly import and register image targetssrc/index.htmlto remove inline script declarationsResult
The example now works correctly with proper image target recognition.
Testing
Tested locally and confirmed that: