cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

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
Highlighted
Helper V
Helper V

Re: pcf-scripts: target ES6

Try to post here.

Highlighted

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!
Highlighted
Helper I
Helper I

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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (10,739)