const {Transformer} = require('@parcel/plugin');

module.exports = new Transformer({
  async transform({asset}) {
    asset.setCode(`import {x} from "x";\n${await asset.getCode()}`);
    return [asset, {type: 'js', content: 'export var x = 2;', uniqueKey: 'x'}];
  },
});
