Skip to content

Commit

Permalink
Use CommonJS for URL export. Fixes #4.
Browse files Browse the repository at this point in the history
  • Loading branch information
developit authored Sep 22, 2018
1 parent 7706c01 commit 903b46b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function pitch (request) {
const entry = entries && entries[0] && entries[0].files[0];
if (!err && !entry) err = Error(`WorkerPlugin: no entry for ${request}`);
if (err) return cb(err);
return cb(null, `export default __webpack_public_path__ + ${JSON.stringify(entry)}`);
return cb(null, `module.exports = __webpack_public_path__ + ${JSON.stringify(entry)}`);
});
};

Expand Down

0 comments on commit 903b46b

Please sign in to comment.