WXL
3 天以前 9bce51f651aad297ef9eb6df832bfdaf1de05d84
node_modules/webpack/lib/node/ReadFileCompileWasmPlugin.js
@@ -14,6 +14,7 @@
/** @typedef {import("../Compiler")} Compiler */
/**
 * Defines the read file compile wasm plugin options type used by this module.
 * @typedef {object} ReadFileCompileWasmPluginOptions
 * @property {boolean=} mangleImports mangle imports
 * @property {boolean=} import use import?
@@ -23,14 +24,16 @@
class ReadFileCompileWasmPlugin {
   /**
    * Creates an instance of ReadFileCompileWasmPlugin.
    * @param {ReadFileCompileWasmPluginOptions=} options options object
    */
   constructor(options = {}) {
      /** @type {ReadFileCompileWasmPluginOptions} */
      this.options = options;
   }
   /**
    * Apply the plugin
    * Applies the plugin by registering its hooks on the compiler.
    * @param {Compiler} compiler the compiler instance
    * @returns {void}
    */
@@ -38,6 +41,7 @@
      compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {
         const globalWasmLoading = compilation.outputOptions.wasmLoading;
         /**
          * Checks whether this read file compile wasm plugin is enabled for chunk.
          * @param {Chunk} chunk chunk
          * @returns {boolean} true, when wasm loading is enabled for the chunk
          */