保誠-保戶業務員媒合平台
HelenHuang
2022-06-09 23b60dc1975db38c280d8a123aff97544d1673e0
PAMapp/node_modules/babel-loader/lib/index.js
@@ -67,7 +67,7 @@
function _loader() {
  _loader = _asyncToGenerator(function* (source, inputSourceMap, overrides) {
    const filename = this.resourcePath;
    let loaderOptions = loaderUtils.getOptions(this) || {};
    let loaderOptions = loaderUtils.getOptions(this);
    validateOptions(schema, loaderOptions, {
      name: "Babel loader"
    });
@@ -128,7 +128,7 @@
    const programmaticOptions = Object.assign({}, loaderOptions, {
      filename,
      inputSourceMap: inputSourceMap || undefined,
      inputSourceMap: inputSourceMap || loaderOptions.inputSourceMap,
      // Set the default sourcemap behavior based on Webpack's mapping flag,
      // but allow users to override if they want.
      sourceMaps: loaderOptions.sourceMaps === undefined ? this.sourceMap : loaderOptions.sourceMaps,
@@ -198,12 +198,22 @@
        });
      } else {
        result = yield transform(source, options);
      } // TODO: Babel should really provide the full list of config files that
      // were used so that this can also handle files loaded with 'extends'.
      } // Availabe since Babel 7.12
      // https://github.com/babel/babel/pull/11907
      if (typeof config.babelrc === "string") {
        this.addDependency(config.babelrc);
      if (config.files) {
        config.files.forEach(configFile => this.addDependency(configFile));
      } else {
        // .babelrc.json
        if (typeof config.babelrc === "string") {
          this.addDependency(config.babelrc);
        } // babel.config.js
        if (config.config) {
          this.addDependency(config.config);
        }
      }
      if (result) {