WXL
3 天以前 9bce51f651aad297ef9eb6df832bfdaf1de05d84
node_modules/webpack/lib/dependencies/CssImportDependency.js
@@ -10,7 +10,7 @@
/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */
/** @typedef {import("../Dependency")} Dependency */
/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */
/** @typedef {import("../DependencyTemplate").CssDependencyTemplateContext} DependencyTemplateContext */
/** @typedef {import("../css/CssParser").Range} Range */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
@@ -44,6 +44,7 @@
   }
   /**
    * Returns an identifier to merge equal requests.
    * @returns {string | null} an identifier to merge equal requests
    */
   getResourceIdentifier() {
@@ -69,6 +70,7 @@
   }
   /**
    * Serializes this instance into the provided serializer context.
    * @param {ObjectSerializerContext} context context
    */
   serialize(context) {
@@ -82,6 +84,7 @@
   }
   /**
    * Restores this instance from the provided deserializer context.
    * @param {ObjectDeserializerContext} context context
    */
   deserialize(context) {
@@ -99,12 +102,14 @@
   ModuleDependency.Template
) {
   /**
    * Applies the plugin by registering its hooks on the compiler.
    * @param {Dependency} dependency the dependency for which the template should be applied
    * @param {ReplaceSource} source the current replace source which can be modified
    * @param {DependencyTemplateContext} templateContext the context object
    * @returns {void}
    */
   apply(dependency, source, templateContext) {
      if (templateContext.type === "javascript") return;
      const dep = /** @type {CssImportDependency} */ (dependency);
      source.replace(dep.range[0], dep.range[1] - 1, "");