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

pcf-scripts: target ES6

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)?

3 REPLIES 3
Lisabel0
Level 8

Re: pcf-scripts: target ES6

Try to post here.

ScottDurow
Level 8

Re: pcf-scripts: target ES6

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
Level: Powered On

Re: pcf-scripts: target ES6

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 😞

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Users online (8,757)