/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra Modified by Evan You @yyx990803 */ var loaderUtils = require('loader-utils') var path = require('path') var hash = require('hash-sum') module.exports = function () {} module.exports.pitch = function (remainingRequest) { if (this.cacheable) this.cacheable() var isServer = this.target === 'node' var isProduction = this.minimize || process.env.NODE_ENV === 'production' var addStylesClientPath = loaderUtils.stringifyRequest(this, '!' + path.join(__dirname, 'lib/addStylesClient.js')) var addStylesServerPath = loaderUtils.stringifyRequest(this, '!' + path.join(__dirname, 'lib/addStylesServer.js')) var request = loaderUtils.stringifyRequest(this, '!!' + remainingRequest) var id = JSON.stringify(hash(request + path.relative(__dirname, this.resourcePath))) var options = loaderUtils.getOptions(this) || {} // direct css import from js --> direct, or manually call `styles.__inject__(ssrContext)` with `manualInject` option // css import from vue file --> component lifecycle linked // style embedded in vue file --> component lifecycle linked var isVue = /"vue":true/.test(remainingRequest) || options.manualInject var shared = [ '// style-loader: Adds some css to the DOM by adding a