question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for 'built' web resources

See original GitHub issue

It would be great if the the Power Platform CLI could be enhanced for ‘built’ webresources, e.g. transpiled TypeScript, minified JavaScript, reduced image resources, resx files, etc. Perhaps something similar to pac solution add-resource-reference, along with a new project type pac resource init --kind TypeScript to initialise a TypeScript webresource project.

In my test repo (https://github.com/filcole/pacbuild) I’ve experimented with building a PCF, plugin, solution and package deployer package using just the pac tooling, which works great. A large remaining gap is webresources, since there is often there is a need to transpile webresources and include them in a solution using a mapping xml file.

Additionally often there is a need to use multiple npm packages, especially with TypeScript builds, e.g. prettier, ESLint, webpack/rollup/parcel, @microsoft/eslint-plugin-power-apps, @types/xrm, etc. Perhaps even sometimes running unit tests with Jest. It would be good if any setup could also include recommendations/guidance on restoring npm packages (npm install or npm ci) as part of a build.

One concern with the pac solution add-reference style, is how one might incrementally build a package. Currently in a hosted github/devops pipeline the MSBuild style will build everything on every build without the ability to use pipeline caching or pipeline artefacts to reduce the build duration. Is this a limitation of MSBuild, or are there techniques to use here?

I think this may be a common issue, since there are many blogs/forums/tweets asking how one might do this: https://twitter.com/EffEyeEll/status/1567929125310009347 https://learn.develop1.net/courses/building-javascript-web-resources-using-typescript https://benediktbergmann.eu/2020/12/04/setting-up-a-typescript-project-for-dataverse/ https://xrm.al/blog/typescript-dataverse https://www.youtube.com/watch?v=VsKsfNkzL50 https://dev.to/oliverflint/d365-typescript-web-resources-part-1-basics-10lg https://www.xrm.dev/typescript-xrmdefinitelytyped/

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
magesoecommented, Sep 29, 2022

Love the idea! One way of getting around the ever changing js world is to provide a run, build, test and so on definition in the package json, but allow us to change it. Then you know the pac cli will call npx run build and we can add whatever we want to it if we adapt the setup

1reaction
daryllabarcommented, Sep 29, 2022

I think one of the biggest hurdles this faces, is the ever changing JS/TS world. How quickly would the setup project fall out of date? Second issue would be how do you pick the default settings/libraries. There are just Soo many options.

Read more comments on GitHub >

github_iconTop Results From Across the Web

21 Resources to Help You Build a Company Website in Less ...
21 Resources to Help You Build a Company Website in Less Than an Hour · 1. Dreamhost · 2. HostGator · 3. WP...
Read more >
24 Free Resources for Web Developers - Skillcrush
24 Free Resources for Web Developers · 1. WordPress. WordPress · 2. MAMP or WampServer. When you build a website with WordPress, the...
Read more >
25+ Web Resources to Help You Build Your Projects - SitePoint
In this showcase, we'll show you 25+ web resources which will help you day-by-day to build and complete your projects.
Read more >
14 resources to help you design your own website - GoDaddy
14 resources to help you design your own website. Develop a strong brand identity; Use a good content management system (CMS); Research websites ......
Read more >
100+ Awesome Web Development Tools and Resources
We are a big fan of Boostrap and the main KeyCDN website is built on it. ... ASP.net: Free, fully supported Web application...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found