项目原始demo,不改动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 

20 lines
434 B

  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. class LoaderTargetPlugin {
  7. constructor(target) {
  8. this.target = target;
  9. }
  10. apply(compiler) {
  11. compiler.plugin("compilation", (compilation) => {
  12. compilation.plugin("normal-module-loader", (loaderContext) => loaderContext.target = this.target);
  13. });
  14. }
  15. }
  16. module.exports = LoaderTargetPlugin;