I was just going through this library HERE (glide.js) , as i was checking the package.json file i see the following command under the key scripts
:
build:esm: rollup --config build/esm.js && rollup --config build/esm.modular.js,
What exactly is this script doing ? I know a a config file is being passed to rollup.js here, but whats with the .esm
? when i see the dist/ folder i also see a glide.esm.js
file , what exactly is this file doing ?
The build config file for esm looks like below:
import build from './build'
export default Object.assign(build, {
input: 'entry/entry-complete.js',
output: Object.assign(build.output, {
file: 'dist/glide.esm.js',
format: 'es'
})
})
But i don't quite understand what the format: 'es'
really means here. Basically to break it down , what is the difference between the glide.js
and the glide.esm.js
file in the dist/
folder ?