Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions website/pages/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,22 @@ module.exports = {
};
```

### Example: Adding images
[Warning: use sparingly as this will increase file size](https://www.npmjs.com/package/@rollup/plugin-image)
```js
const image = require("@rollup/plugin-image");

module.exports = {
rollup(config, options) {
config.plugins = [
image({ incude: ["**/*.png", "**/*.jpg"] }),
...config.plugins,
];
return config;
},
};
```

## Babel

You can add your own `.babelrc` to the root of your project and TSDX will **merge** it with [its own Babel transforms](https://github.com/formium/tsdx/blob/master/src/babelPluginTsdx.ts) (which are mostly for optimization), putting any new presets and plugins at the end of its list.
Expand Down