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

Extending the pcf-scripts' webpack

Hi, 

Is there a way to extend the standard PCF CLI's webpack? In one of the project, I want to use webpack to include additional files to be copied to the build (out) folder.

 

TIA

Andre

4 REPLIES 4
ScottDurow
Level 8

Re: Extending the pcf-scripts' webpack

There isn't any kind of eject mechansim - but you can edit the webpackconfig in the node_modules/pcf-scripts/webpackconfig.js

 

This is technically unsupported and be careful that you don't loose your edits if you restore the npm packages.

 

I think if you start changing the webpack then you are essentially going to go it alone and will need to manually pack your controls going forwards. 

 

What is it that you want to change in the webpack config? You should use the  <resources> in the control manifest to add additional html/css/images/js/resx

 

 

a33ik
Level: Powered On

Re: Extending the pcf-scripts' webpack

@ScottDurow is there a way now to include js files? It was possible in earlier versions but it's not possible now or you know something that I don't know.

Highlighted
PowerApps Staff HemantG
PowerApps Staff

Re: Extending the pcf-scripts' webpack

We had lib tag for including libraries in manifest during private preview but it was removed due to potential conflict and upgrade issues across components from multiple sources.

Currently supported mechanism is to include shared js via import directly into control index.ts. see example here - https://docs.microsoft.com/en-us/powerapps/developer/component-framework/sample-controls/angular-fli...

We are looking into getting webpack enabled shared libs for future release so that code can be shared across controls.

Hemant
AndreMargono
Level: Powered On

Re: Extending the pcf-scripts' webpack

Looking forward when this shared library can be implemented.

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: 138 members 5,457 guests
Please welcome our newest community members: