cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
farihaabbasi
Regular Visitor

Can we use webpack in powerapps?

Hi, my use case is to use our opensource javascript library into power apps, I found this as starting point and following along: https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/walkthrough-write-y...

 

From this model-driven-app, seems that we can load the single plain javascript file into webresources and then use it from there. 

 

Since my library is based on multiple files and npm modules, so I was thinking to webpack them into single file and then load into webresources to use it into powerapps. I tried creating webpack of the sample javascript code given above, but couldn't run properly. 

 

Please advice if we can really use webpack into powerapps or not and what you think of my solution, or is there any better solution?

3 REPLIES 3
v-xida-msft
Community Support
Community Support

Hi @farihaabbasi ,

Do you want to use your JavaScript code within a Model-Driven app?

Further, do you want to webpack your multiple JavaScript files into a Single one file, then load the Single one file into webresources within Model-Driven app?

 

Currently, webpack is not supported within PowerApps Model-Driven app. If you want to use webpack within PowerApps, I afraid that there is no way to achieve your needs in PowerApps.

 

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for the prompt reply, Can you suggest me what could be the best way to achieve this use case if webpack is not supported?

 

I have multiple javascript files that use node modules, and I want to run them all in powerapps, if there is a way. Thank you. 

To the best of my knowledge there should be no issue with using webpack to bundle your javascript as long as you are bundling it as a library. That is you need to ensure your webpack config has output.library set to the name of your library.

 

Can you please clarify what sort of issues you were facing when you tried to bundle with webpack? Also what sort of code are you trying to bundle; is it a client API script, a power control, or something else?

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (71,113)