See parcel-bundler/parcel#106 for more information about the problem this project demonstrates.
yarnornpm installyarn startornpm start- Open
http://localhost:1234
Hello, World! Inlining via fs.readFileSync is working!
Oh no, inlining via fs.readFileSync is not working: TypeError: _fs2.default.readFileSync is not a function. (In '_fs2.default.readFileSync(__dirname + '/name.txt', 'utf8')', '_fs2.default.readFileSync' is undefined)
- Stop Parcel (^C)
- Disable Babel (
rm .babelrc) - Clear the parcel cache (
rm -rf .cache) yarn startornpm start- Open
http://localhost:1234
-
Stop Parcel (^C)
-
Update
.babelrc:{ "presets": [ ["env", { "modules": false }] ] } -
Clear the parcel cache (
rm -rf .cache) -
yarn startornpm start -
Open
http://localhost:1234