-
Notifications
You must be signed in to change notification settings - Fork 14
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
Webflow integration #904
Comments
According to webflow, we can't use NPM packages directly in the webflow. Indirectly there are 2 ways to do it :-
Now 2nd option is not possible because its custom code has a limit of only 10000 characters. If we go with the 1st option then also there is a problem that we have multiple files & componenets in our widget. So we can't add CDN links for each and every file in the custom code of webflow. I tried bundling the add with parcel bundler which creates single output file which we can use via CDN link and may be that works. But it didn't worked. NOTE : How typescript will work in webflow that solution I haven't found yet. For more details checkout this discussion on webflow : https://discourse.webflow.com/t/running-a-js-package-through-npm-on-webflow/116041/7 To use normal React code snippet in webflow, we can do like this. This is a React.js example code for webflow.
Now if you publish the website and open it you will see the react code works. It means react code works in webflow. -------------------------------------------------------------------------------------------------------------------------------------------------------------------- Now to use the DM3 widget in webflow, following code has been tested which doesn't works and gives error cannot use export in browser, if cjs directory is used instead of esm then also same error is thrown. The code snippet used is
It doesn't works |
Requirements
Build a demo project in webflow, which integrates the dm3-messenger-widget. The name of the project is
dm3-demo-integration-webflow
.The goal is, to fully integrate dm3 in webflow applications and provide an example (this project), of how to do it.
Tasks
The text was updated successfully, but these errors were encountered: