Urara-Blog/node_modules/.pnpm-store/v3/files/64/7fba712d92bde8ad5c69915a6ad9f578567b0dfcbe76a9455f273de0cb187297e299d8fb74dd1e31557ee066010aca330387f8ca3cfbaf2060d7836d2882b7
2022-08-14 01:14:53 +08:00

25 lines
550 B
Text

const MARKER = "my-special-import";
module.exports = (config, outputOptions, omt) => {
config.plugins = [
omt(),
{
resolveId(id) {
if (id !== MARKER) {
return;
}
return id;
},
load(id) {
if (id !== MARKER) {
return;
}
const referenceId = this.emitFile({
type: "asset",
name: "my-asset.bin",
source: "assetcontent"
});
return `export default import.meta.ROLLUP_FILE_URL_${referenceId}`;
}
}
];
};