-
Notifications
You must be signed in to change notification settings - Fork 87
Description
Hallo,
I spent 2 days trying to use js proto in my web app.
I compiled .proto files to js using protoc compiler with protoc-gen-js plugin. Tried to use commonjs syntax and without it, my app still failes to import the js module.
In my app i'm improting proto this way:
import * as iproto from './protos/classificationlist';
When i'm using commonjs style - it complains that "require is not defined".
When i'm trying without commonjs - it complaines that "goog is not defined".
Not sure what else should i do.
I checked some web sources in official mediapipe github, they use standart import style like i'm using:
import {ClassificationList as ClassificationListProto} from '../../../../framework/formats/classification_pb';
But there is no additional information, everybody are using mediapipe as npm bundles. So not sure how it works there.
Any help will be appreciated...