Closed xiaohulu closed 3 years ago
There is a a.jpg image at assets folder.
a.jpg
assets
Then I require a.jpg at Home.ts
Home.ts
const png1 = require("../assets/a.jpg"); const factory = create(); export default factory(function Profile() { return v('h1', { classes: [css.root] }, [ 'Home Page', v('img', {src: png1}) ]); });
then run npm run build(dojo build widget --mode dist --target lib) to build a dojo library, build success, but a.jpg can not open.
npm run build
dojo build widget --mode dist --target lib
demo https://github.com/xiaohulu/dojo-picture
There is a
a.jpg
image atassets
folder.Then I require
a.jpg
atHome.ts
then run
npm run build
(dojo build widget --mode dist --target lib
) to build a dojo library, build success, buta.jpg
can not open.demo https://github.com/xiaohulu/dojo-picture