What is the problem with the configuration of transform-class-properties?

transform-class-properties mainly solves the problem that is not supported by defaultProps= {} in the declaration of using class in es6.

needs to be escaped using stage-0 or the plug-in.

< H2 > question: < / H2 >

{

spec:true //false

}

< H2 > reference: official original link. I don"t understand < / H2 >

https://babeljs.io/docs/plugi.

Mar.07,2021

in fact, the subject can write a script and run for a while:

1.js

babel 1.js -o 1.false.js 
babel 1.js -o 1.true.js  //  `spec`

compare the two generated files, in fact, as written in the document:

when spec is true ,

  1. replaces assignment operations such as title="a" with Object.defineProperty .
  2. static variables ( cover ) are created even if they do not have an initial value.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf56fd-54bd6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf56fd-54bd6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?