Adds a new JS identifier called answerToTheUltimateQuestionOfLifeTheUniverseAndEverything
, that it will be replaced with the value 42
by Babel in compile time.
For example, it should convert this code:
console.log(`What is the answer?: ${answerToTheUltimateQuestionOfLifeTheUniverseAndEverything}`);
...to this one:
console.log(`What is the answer?: ${42}`);
Run npm install
.
Run the compiler:
npm run build
It will compile the source file in sample/index.js
to lib/index.js
. Check the code of both files to see the difference. The compiled file can be executed with node lib
.