resolve-webpack-url.js 613 B

1234567891011121314151617181920212223
  1. "use strict";
  2. /*
  3. Copyright 2018 Google LLC
  4. Use of this source code is governed by an MIT-style
  5. license that can be found in the LICENSE file or at
  6. https://opensource.org/licenses/MIT.
  7. */
  8. /**
  9. * Resolves a url in the way that webpack would (with string concatenation)
  10. *
  11. * Use publicPath + filePath instead of url.resolve(publicPath, filePath) see:
  12. * https://webpack.js.org/configuration/output/#output-publicpath
  13. *
  14. * @function resolveWebpackURL
  15. * @param {Array<string>} paths File paths to join
  16. * @return {string} Joined file path
  17. *
  18. * @private
  19. */
  20. module.exports = (...paths) => paths.join('');