1

I am trying to modify the popular Energy-skate-park simulation so that it launches with the grids visible. While looking at the code I came across declarations like the following:

var energyEnergyString = require( 'string!ENERGY_SKATE_PARK_BASICS/energy.energy' );

var energyKineticString = require( 
'string!ENERGY_SKATE_PARK_BASICS/energy.kinetic' );

I have no idea what this "string!" followed by some file path means. Is it angular? Is it vanilla JS feature?

Can anyone please guide me to the right direction/documentation to understand these declarations better?

Heretic Monkey
  • 11,687
  • 7
  • 53
  • 122
Yeasir Arafat Majumder
  • 1,222
  • 2
  • 15
  • 34
  • Here's an answer for require.js: https://stackoverflow.com/questions/18512503/can-someone-explain-the-syntax-involved-in-this-require-js-example – Barmar Mar 02 '18 at 23:57
  • I dont mind the negative vote if i asked a stupid question. But at the same time explaining or trying to answer my question will help me to not receive more negative points!! Thanks – Yeasir Arafat Majumder Mar 02 '18 at 23:58

1 Answers1

2

This is probably a webpack-loader, in your case, string-loader that transforms the required file to a string.

felixmosh
  • 32,615
  • 9
  • 69
  • 88