Ignore:
Timestamp:
11/25/21 22:08:24 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
8d391a1
Parents:
59329aa
Message:

primeNG components

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/node_modules/mini-css-extract-plugin/dist/index.js

    r59329aa re29cc2e  
    77
    88var _schemaUtils = require("schema-utils");
    9 
    10 var _identifier = require("webpack/lib/util/identifier");
    119
    1210var _pluginOptions = _interopRequireDefault(require("./plugin-options.json"));
     
    5452        identifierIndex,
    5553        content,
     54        layer,
     55        supports,
    5656        media,
    5757        sourceMap,
     
    6565        this._identifierIndex = identifierIndex;
    6666        this.content = content;
     67        this.layer = layer;
     68        this.supports = supports;
    6769        this.media = media;
    6870        this.sourceMap = sourceMap;
     
    108110
    109111      updateCacheModule(module) {
    110         if (this.content !== module.content || this.media !== module.media || this.sourceMap !== module.sourceMap || this.assets !== module.assets || this.assetsInfo !== module.assetsInfo) {
     112        if (this.content !== module.content || this.layer !== module.layer || this.supports !== module.supports || this.media !== module.media || this.sourceMap !== module.sourceMap || this.assets !== module.assets || this.assetsInfo !== module.assetsInfo) {
    111113          this._needBuild = true;
    112114          this.content = module.content;
     115          this.layer = module.layer;
     116          this.supports = module.supports;
    113117          this.media = module.media;
    114118          this.sourceMap = module.sourceMap;
     
    143147        const hash = webpack.util.createHash(hashFunction);
    144148        hash.update(this.content);
     149
     150        if (this.layer) {
     151          hash.update(this.layer);
     152        }
     153
     154        hash.update(this.supports || "");
    145155        hash.update(this.media || "");
    146156        hash.update(this.sourceMap || "");
     
    161171        write(this._identifierIndex);
    162172        write(this.content);
     173        write(this.layer);
     174        write(this.supports);
    163175        write(this.media);
    164176        write(this.sourceMap);
     
    190202        const identifierIndex = read();
    191203        const content = read();
     204        const layer = read();
     205        const supports = read();
    192206        const media = read();
    193207        const sourceMap = read();
     
    199213          identifierIndex,
    200214          content,
     215          layer,
     216          supports,
    201217          media,
    202218          sourceMap,
     
    225241        identifier,
    226242        content,
     243        layer,
     244        supports,
    227245        media,
    228246        sourceMap
     
    232250        this.identifierIndex = identifierIndex;
    233251        this.content = content;
     252        this.layer = layer;
     253        this.supports = supports;
    234254        this.media = media;
    235255        this.sourceMap = sourceMap;
     
    256276        write(this.identifier);
    257277        write(this.content);
     278        write(this.layer);
     279        write(this.supports);
    258280        write(this.media);
    259281        write(this.sourceMap);
     
    284306          identifier: read(),
    285307          content: read(),
     308          layer: read(),
     309          supports: read(),
    286310          media: read(),
    287311          sourceMap: read()
     
    307331      filename: DEFAULT_FILENAME,
    308332      ignoreOrder: false,
    309       experimentalUseImportModule: false
     333      // TODO remove in the next major release
     334      // eslint-disable-next-line no-undefined
     335      experimentalUseImportModule: undefined,
     336      runtime: true
    310337    }, options);
    311338    this.runtimeOptions = {
     
    347374
    348375    if (this.options.experimentalUseImportModule) {
    349       if (!compiler.options.experiments) {
    350         throw new Error("experimentalUseImportModule is only support for webpack >= 5.33.2");
    351       }
    352 
    353376      if (typeof compiler.options.experiments.executeModule === "undefined") {
    354377        // eslint-disable-next-line no-param-reassign
     
    469492          chunk.contentHash[_utils.MODULE_TYPE] = hash.digest(hashDigest).substring(0, hashDigestLength);
    470493        }
    471       });
     494      }); // All the code below is dedicated to the runtime and can be skipped when the `runtime` option is `false`
     495
     496      if (!this.options.runtime) {
     497        return;
     498      }
     499
    472500      const {
    473         Template
    474       } = webpack;
    475       const {
     501        Template,
    476502        RuntimeGlobals,
     503        RuntimeModule,
    477504        runtime
    478505      } = webpack; // eslint-disable-next-line no-shadow
     
    497524        return obj;
    498525      };
    499 
    500       const {
    501         RuntimeModule
    502       } = webpack;
    503526
    504527      class CssLoadingRuntimeModule extends RuntimeModule {
     
    715738        }
    716739
     740        if (module.supports) {
     741          source.add(`@supports (${module.supports}) {\n`);
     742        }
     743
    717744        if (module.media) {
    718745          source.add(`@media ${module.media} {\n`);
    719746        }
    720747
     748        const needLayer = typeof module.layer !== "undefined";
     749
     750        if (needLayer) {
     751          source.add(`@layer${module.layer.length > 0 ? ` ${module.layer}` : ""} {\n`);
     752        }
     753
    721754        const {
    722755          path: filename
    723756        } = compilation.getPathWithInfo(filenameTemplate, pathData);
    724         const undoPath = (0, _identifier.getUndoPath)(filename, compiler.outputPath, false);
     757        const undoPath = (0, _utils.getUndoPath)(filename, compiler.outputPath, false);
     758        content = content.replace(new RegExp(_utils.ABSOLUTE_PUBLIC_PATH, "g"), "");
     759        content = content.replace(new RegExp(_utils.SINGLE_DOT_PATH_SEGMENT, "g"), ".");
    725760        content = content.replace(new RegExp(_utils.AUTO_PUBLIC_PATH, "g"), undoPath);
    726761
     
    733768        source.add("\n");
    734769
     770        if (needLayer) {
     771          source.add("}\n");
     772        }
     773
    735774        if (module.media) {
     775          source.add("}\n");
     776        }
     777
     778        if (module.supports) {
    736779          source.add("}\n");
    737780        }
Note: See TracChangeset for help on using the changeset viewer.