Blame view

node_modules/less-loader/dist/removeSourceMappingUrl.js 628 Bytes
ce4c83ff   wxy   初始提交
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  'use strict';
  
  var matchSourceMappingUrl = /\/\*# sourceMappingURL=[^*]+\*\//;
  
  /**
   * Removes the sourceMappingURL comment. This is necessary because the less-loader
   * does not know where the final source map will be located. Thus, we remove every
   * reference to source maps. In a regular setup, the css-loader will embed the
   * source maps into the CommonJS module and the style-loader will translate it into
   * base64 blob urls.
   *
   * @param {string} content
   * @returns {string}
   */
  function removeSourceMappingUrl(content) {
    return content.replace(matchSourceMappingUrl, '');
  }
  
  module.exports = removeSourceMappingUrl;