vue-loader
Advanced tools
Comparing version 16.0.0 to 16.1.0
@@ -13,3 +13,4 @@ import webpack = require('webpack'); | ||
appendExtension?: boolean; | ||
isServerBuild?: boolean; | ||
} | ||
export default function loader(this: webpack.loader.LoaderContext, source: string): string | void; |
@@ -26,2 +26,3 @@ "use strict"; | ||
function loader(source) { | ||
var _a; | ||
const loaderContext = this; | ||
@@ -42,3 +43,3 @@ // check if plugin is installed | ||
{}); | ||
const isServer = target === 'node'; | ||
const isServer = (_a = options.isServerBuild) !== null && _a !== void 0 ? _a : target === 'node'; | ||
const isProduction = mode === 'production'; | ||
@@ -45,0 +46,0 @@ const { descriptor, errors } = compiler_sfc_1.parse(source, { |
@@ -20,2 +20,3 @@ "use strict"; | ||
function resolveScript(descriptor, scopeId, options, loaderContext) { | ||
var _a; | ||
if (!descriptor.script && !descriptor.scriptSetup) { | ||
@@ -25,3 +26,3 @@ return null; | ||
const isProd = loaderContext.mode === 'production'; | ||
const isServer = loaderContext.target === 'node'; | ||
const isServer = (_a = options.isServerBuild) !== null && _a !== void 0 ? _a : loaderContext.target === 'node'; | ||
const enableInline = canInlineTemplate(descriptor, isProd); | ||
@@ -28,0 +29,0 @@ const cacheToUse = isServer ? serverCache : clientCache; |
@@ -13,2 +13,3 @@ "use strict"; | ||
const TemplateLoader = function (source, inMap) { | ||
var _a; | ||
source = String(source); | ||
@@ -21,3 +22,3 @@ const loaderContext = this; | ||
{}); | ||
const isServer = loaderContext.target === 'node'; | ||
const isServer = (_a = options.isServerBuild) !== null && _a !== void 0 ? _a : loaderContext.target === 'node'; | ||
const isProd = loaderContext.mode === 'production'; | ||
@@ -24,0 +25,0 @@ const query = qs.parse(loaderContext.resourceQuery.slice(1)); |
{ | ||
"name": "vue-loader", | ||
"version": "16.0.0", | ||
"version": "16.1.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "author": "Evan You", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52035
1030
29