cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MannyGrewal
Level: Powered On

JS Bundling

Hi

I am updating my ts and the updated script is not reflected upon deploying the solution. Can you please provide some insight into how the Javascript is referred by the custom control running on the CRM form. 

 

When I unzip the solution zip file, I only find the bundle.js file inside it and no ts file. The bundle.js file has a local reference to the .ts file. If the actual script is not injected in the solution manifest, then how does it get deployed to the CRM server and get referred by the control?

 

BTW - I was able to get my updated ts/css by deleting the solution folder & reinitialising the solution manifest. Is there a possibility of some kind of caching going on, any best practices to get rid of the cache and be able to ship the updates quickly from Visual Studio to CRM.

 

Cheers

Manny

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
PowerApps Staff HemantG
PowerApps Staff

Re: JS Bundling

All your steps are correct but there is one nuance to update the custom controls.

 

In the control menifest the control version number needs to be bumped

eg

 

<control namespace="azureMaps" constructor="azureMap" version="0.0.6" display-name-key="azure Map control "
<control namespace="azureMaps" constructor="azureMap" version="0.0.7" display-name-key="azure Map control "
Current design is to optimize the solution import process where large solutions are deployed but the controls are not necessarily updated or ready to be shipped with the changes. Sorry for the incovenience caused, we are aware of this issue and are looking into ways to address this.
 
 

View solution in original post

2 REPLIES 2
MannyGrewal
Level: Powered On

Re: JS Bundling

To clarify a bit more, this is update cycle I am following

 

Scenario 1 - new script

1a. TS file version v1

1b. Packaged in sol v1

1c. Deployed and control hooked to view, all good.

 

Scenario 2 - updated script

2a. TS file version updated to v2

2b. npm run build -> msbuild :/restore -> msbuild

2c. solution deployed - no update seen in the control

 

Scenario 3 - recreated solution

3a. TS file version updated to v2

3b. npm run build -> delete solution folder-> setup blank manifest -> msbuild :/restore -> msbuild

3c. solution deployed - update still not seen in the control

 

Scenario 4 - deleted control

4a. deleted control in the CRM

Repeated step 3a to 3c

Then finally update seen in the control

 

How and from where does the custom control resolve the JS and TS at runtime? This insight will help us alleviate any caching problems, etc. 

 

Cheers

 

 

Highlighted
PowerApps Staff HemantG
PowerApps Staff

Re: JS Bundling

All your steps are correct but there is one nuance to update the custom controls.

 

In the control menifest the control version number needs to be bumped

eg

 

<control namespace="azureMaps" constructor="azureMap" version="0.0.6" display-name-key="azure Map control "
<control namespace="azureMaps" constructor="azureMap" version="0.0.7" display-name-key="azure Map control "
Current design is to optimize the solution import process where large solutions are deployed but the controls are not necessarily updated or ready to be shipped with the changes. Sorry for the incovenience caused, we are aware of this issue and are looking into ways to address this.
 
 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 258 members 5,066 guests
Please welcome our newest community members: