@lwc/compiler
Advanced tools
Comparing version 8.3.0 to 8.4.0
@@ -67,2 +67,4 @@ /** | ||
enableLightningWebSecurityTransforms: false, | ||
targetSSR: false, | ||
ssrMode: 'asyncYield', | ||
}; | ||
@@ -145,3 +147,2 @@ const DEFAULT_DYNAMIC_IMPORT_CONFIG = { | ||
apiVersion, | ||
targetSSR: !!options.targetSSR, | ||
}; | ||
@@ -385,10 +386,10 @@ } | ||
function transformFile(src, filename, options) { | ||
let transformer; | ||
switch (path__namespace.extname(filename)) { | ||
case '.html': | ||
transformer = options.targetSSR ? ssrCompiler.compileTemplateForSSR : templateTransform; | ||
break; | ||
if (options.targetSSR) { | ||
return ssrCompiler.compileTemplateForSSR(src, filename, options, options.ssrMode); | ||
} | ||
return templateTransform(src, filename, options); | ||
case '.css': | ||
transformer = styleTransform; | ||
break; | ||
return styleTransform(src, filename, options); | ||
case '.tsx': | ||
@@ -400,4 +401,6 @@ case '.jsx': | ||
case '.mjs': | ||
transformer = options.targetSSR ? ssrCompiler.compileComponentForSSR : scriptTransform; | ||
break; | ||
if (options.targetSSR) { | ||
return ssrCompiler.compileComponentForSSR(src, filename, options, options.ssrMode); | ||
} | ||
return scriptTransform(src, filename, options); | ||
default: | ||
@@ -409,3 +412,2 @@ throw errors.generateCompilerError(errors.TransformerErrors.NO_AVAILABLE_TRANSFORMER, { | ||
} | ||
return transformer(src, filename, options); | ||
} | ||
@@ -420,3 +422,3 @@ | ||
/** The version of LWC being used. */ | ||
const version = "8.3.0"; | ||
const version = "8.4.0"; | ||
@@ -426,3 +428,3 @@ exports.transform = transform; | ||
exports.version = version; | ||
/** version: 8.3.0 */ | ||
/** version: 8.4.0 */ | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -42,2 +42,4 @@ /** | ||
enableLightningWebSecurityTransforms: false, | ||
targetSSR: false, | ||
ssrMode: 'asyncYield', | ||
}; | ||
@@ -120,3 +122,2 @@ const DEFAULT_DYNAMIC_IMPORT_CONFIG = { | ||
apiVersion, | ||
targetSSR: !!options.targetSSR, | ||
}; | ||
@@ -360,10 +361,10 @@ } | ||
function transformFile(src, filename, options) { | ||
let transformer; | ||
switch (path.extname(filename)) { | ||
case '.html': | ||
transformer = options.targetSSR ? compileTemplateForSSR : templateTransform; | ||
break; | ||
if (options.targetSSR) { | ||
return compileTemplateForSSR(src, filename, options, options.ssrMode); | ||
} | ||
return templateTransform(src, filename, options); | ||
case '.css': | ||
transformer = styleTransform; | ||
break; | ||
return styleTransform(src, filename, options); | ||
case '.tsx': | ||
@@ -375,4 +376,6 @@ case '.jsx': | ||
case '.mjs': | ||
transformer = options.targetSSR ? compileComponentForSSR : scriptTransform; | ||
break; | ||
if (options.targetSSR) { | ||
return compileComponentForSSR(src, filename, options, options.ssrMode); | ||
} | ||
return scriptTransform(src, filename, options); | ||
default: | ||
@@ -384,3 +387,2 @@ throw generateCompilerError(TransformerErrors.NO_AVAILABLE_TRANSFORMER, { | ||
} | ||
return transformer(src, filename, options); | ||
} | ||
@@ -395,6 +397,6 @@ | ||
/** The version of LWC being used. */ | ||
const version = "8.3.0"; | ||
const version = "8.4.0"; | ||
export { transform, transformSync, version }; | ||
/** version: 8.3.0 */ | ||
/** version: 8.4.0 */ | ||
//# sourceMappingURL=index.js.map |
import { InstrumentationObject } from '@lwc/errors'; | ||
import { CompilationMode } from '@lwc/ssr-compiler'; | ||
import type { CustomRendererConfig } from '@lwc/template-compiler'; | ||
@@ -83,2 +84,3 @@ type RecursiveRequired<T> = { | ||
targetSSR?: boolean; | ||
ssrMode?: CompilationMode; | ||
} | ||
@@ -85,0 +87,0 @@ type OptionalTransformKeys = 'name' | 'namespace' | 'scopedStyles' | 'customRendererConfig' | 'enableLwcSpread' | 'enableLightningWebSecurityTransforms' | 'enableDynamicComponents' | 'experimentalDynamicDirective' | 'experimentalDynamicComponent' | 'instrumentation'; |
@@ -7,3 +7,3 @@ { | ||
"name": "@lwc/compiler", | ||
"version": "8.3.0", | ||
"version": "8.4.0", | ||
"description": "LWC compiler", | ||
@@ -52,9 +52,9 @@ "keywords": [ | ||
"@locker/babel-plugin-transform-unforgeables": "0.22.0", | ||
"@lwc/babel-plugin-component": "8.3.0", | ||
"@lwc/errors": "8.3.0", | ||
"@lwc/shared": "8.3.0", | ||
"@lwc/ssr-compiler": "8.3.0", | ||
"@lwc/style-compiler": "8.3.0", | ||
"@lwc/template-compiler": "8.3.0" | ||
"@lwc/babel-plugin-component": "8.4.0", | ||
"@lwc/errors": "8.4.0", | ||
"@lwc/shared": "8.4.0", | ||
"@lwc/ssr-compiler": "8.4.0", | ||
"@lwc/style-compiler": "8.4.0", | ||
"@lwc/template-compiler": "8.4.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
70269
1007
+ Added@lwc/babel-plugin-component@8.4.0(transitive)
+ Added@lwc/errors@8.4.0(transitive)
+ Added@lwc/shared@8.4.0(transitive)
+ Added@lwc/ssr-compiler@8.4.0(transitive)
+ Added@lwc/style-compiler@8.4.0(transitive)
+ Added@lwc/template-compiler@8.4.0(transitive)
+ Addedpostcss-selector-parser@7.0.0(transitive)
- Removed@lwc/babel-plugin-component@8.3.0(transitive)
- Removed@lwc/errors@8.3.0(transitive)
- Removed@lwc/shared@8.3.0(transitive)
- Removed@lwc/ssr-compiler@8.3.0(transitive)
- Removed@lwc/style-compiler@8.3.0(transitive)
- Removed@lwc/template-compiler@8.3.0(transitive)
- Removedpostcss-selector-parser@6.1.2(transitive)
Updated@lwc/errors@8.4.0
Updated@lwc/shared@8.4.0
Updated@lwc/ssr-compiler@8.4.0
Updated@lwc/style-compiler@8.4.0
Updated@lwc/template-compiler@8.4.0