phetsims / area-builder

"Area Builder" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/area-builder
GNU General Public License v3.0
1 stars 2 forks source link

bad require statement #112

Closed pixelzoom closed 4 years ago

pixelzoom commented 4 years ago

AreaBuilderSharedConstants.js:

  INVALID_VALUE: require( 'string!AREA_BUILDER/invalidValue' )

This require violates PhET conventions and will not be properly handled by ES6 migration tools. You'll need to pull this out into a const statement:

const invalidValueString = require( 'string!AREA_BUILDER/invalidValue' );
...
  INVALID_VALUE: invalidValueString

Priority high, since ES6 migration will be occurring soon.

zepumph commented 4 years ago

See https://github.com/phetsims/chipper/issues/849 as the parent/duplicate issue.