source: frontend/node_modules/@surma/rollup-plugin-off-main-thread/tests/fixtures/assets-in-worker/rollup.config.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago

Fix frontend appearance

  • Property mode set to 100644
File size: 550 bytes
Line 
1const MARKER = "my-special-import";
2module.exports = (config, outputOptions, omt) => {
3 config.plugins = [
4 omt(),
5 {
6 resolveId(id) {
7 if (id !== MARKER) {
8 return;
9 }
10 return id;
11 },
12 load(id) {
13 if (id !== MARKER) {
14 return;
15 }
16 const referenceId = this.emitFile({
17 type: "asset",
18 name: "my-asset.bin",
19 source: "assetcontent"
20 });
21 return `export default import.meta.ROLLUP_FILE_URL_${referenceId}`;
22 }
23 }
24 ];
25};
Note: See TracBrowser for help on using the repository browser.