meta icon indicating copy to clipboard operation
meta copied to clipboard

files such as images don't work with ESM style imports

Open JamesLMilner opened this issue 6 years ago • 0 comments

At the moment to import images in Dojo you have to use require.

For example say we want to use an image in a widget, we must do it like so:

const bottomImage = require('./../images/placeholder.png') 

It would be consistent and idomatic to be able to do image imports as we do with modules like this:

import bottomImage from './../images/placeholder.png';

JamesLMilner avatar Jun 05 '18 11:06 JamesLMilner