Open tmhrtwg opened 4 years ago
My source file (main.es6.js):
main.es6.js
const possibleDirections = { top: true, right: false, bottom: true, left: true } const directions = Object.entries(possibleDirections) for (const [direction, isPossible] of directions) { console.log(`${direction}, ${[isPossible]}`) }
The rendered JS file (main.js):
main.js
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; var possibleOptions = { top: true, right: false, bottom: true, left: true }; var options = Object.entries(possibleOptions); for (var _i = 0, _options = options; _i < _options.length; _i++) { var _options$_i = _slicedToArray(_options[_i], 2), direction = _options$_i[0], truefalse = _options$_i[1]; }
The for..of causes Babel to need an import. This cannot be found and Goat gives an error:
Module not found: Error: Can't resolve '@babel/runtime/helpers/slicedToArray' in '<my path>/src/js' @ ./src/js/main.es6.js 1:0-66 12:20-34```
This will be fixed in the next release, Rollup is used to resolve imports.
My source file (
main.es6.js
):The rendered JS file (
main.js
):The for..of causes Babel to need an import. This cannot be found and Goat gives an error: