Skip to content

Commit

Permalink
feat: expose loader context and virtual write to preprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Dec 1, 2020
1 parent d4e2c20 commit 517bc5c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ module.exports = function(source, map) {
}

if (options.emitCss) compileOptions.css = false;


if (typeof options.preprocess === 'function') {
options.preprocess = options.preprocess(this, virtualModules.writeModule.bind(virtualModules));
}

deprecatePreprocessOptions(options);
options.preprocess.filename = compileOptions.filename;

Expand Down

0 comments on commit 517bc5c

Please sign in to comment.