web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / pcf-scripts: target ES6
Power Apps
Unanswered

pcf-scripts: target ES6

(0) ShareShare
ReportReport
Posted on by 72

I'm not a big Webpack/Babel/tsconfig ninja, that's why I'm asking this. 🙂

ATM this is the tsconfig file for pcf-scripts:

 

{
 "compilerOptions": {
 "jsx": "react",
 "target": "es5",
 "module": "commonjs",
 "lib": ["ES6", "DOM"],
 "strict": true,
 "strictPropertyInitialization": false
 },
 "exclude": [
 "./node_modules"
 ]
}

 

I'm using some other libs when developing my component thus I have to set target: es6 and lib: ["es2015", "dom"].

I took a look at webpackConfig.js, but didn't notice anything forbidding me to do so.

Using the new tsconfig the component compiles successfully.

So is it possible to make these changes and not break the pac tool(s)?

I have the same question (0)
  • Lisabel0 Profile Picture
    154 on at

    Try to post here.

  • ScottDurow Profile Picture
    1,039 on at
    I target ES6 when debugging in chrome so that you get the source maps without all the es5 transpiled code. Make sure you set it back to es5 for release otherwise your code won’t work on non-es6 supporting browsers!
  • KoBe321 Profile Picture
    72 on at

    You are right, thanks! I didn't find any settings which might transpile the code to ES5 or lower using Babel in pcf-scripts.

    I checked my bundle.js and if I switch to target ES6, it stays ES6 😞

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard