How to ship components with images properly

// tsdx.config.js

const images = require('@rollup/plugin-image');

module.exports = {
  rollup(config, options) {
    config.plugins = [
      images({ include: ['**/*.png', '**/*.jpg'] }),
      ...config.plugins,
    ]

    return config
  },
}

 

posted @ 2021-08-23 17:48  Redchar  阅读(469)  评论(0编辑  收藏  举报