How to use the @parcel/logger.default.warn function in @parcel/logger

To help you get started, we’ve selected a few @parcel/logger examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github parcel-bundler / parcel / packages / core / parcel-bundler / src / assets / JSAsset.js View on Github external
} catch (err) {
                logger.warn(
                  `Could not load source file "${source}" in source map of "${
                    this.relativeName
                  }".`
                );
              }
            })
          );

          this.sourceMap.sourcesContent = this.sourceMap.sourcesContent.concat(
            contents
          );
        }
      } catch (e) {
        logger.warn(
          `Could not load existing sourcemap of "${this.relativeName}".`
        );
      }
    }
  }
github parcel-bundler / parcel / packages / core / parcel-bundler / src / assets / JSAsset.js View on Github external
missingSources.map(async source => {
              try {
                let sourceFile = path.join(
                  path.dirname(filename),
                  this.sourceMap.sourceRoot || '',
                  source
                );
                let result = await fs.readFile(sourceFile, 'utf8');
                this.addDependency(sourceFile, {includedInParent: true});
                return result;
              } catch (err) {
                logger.warn(
                  `Could not load source file "${source}" in source map of "${
                    this.relativeName
                  }".`
                );
              }
            })
          );