Skip to content

Commit 68de1e0

Browse files
authored
build(lwc): generate dist files for engine-server (salesforce#1961)
1 parent 67bbf0f commit 68de1e0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

packages/lwc/scripts/build.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ function buildEngineTargets(targets) {
4444
return targets.map((bundleConfig) => buildBundleConfig(engineConfig, bundleConfig));
4545
}
4646

47+
function buildEngineServerTargets(targets) {
48+
const targetName = 'engine-server';
49+
const input = getEs6ModuleEntry('@lwc/engine-server');
50+
const dir = path.join(distDirectory, 'engine-server');
51+
const engineConfig = { input, targetName, dir };
52+
53+
return targets.map((bundleConfig) => buildBundleConfig(engineConfig, bundleConfig));
54+
}
55+
4756
function buildSyntheticShadow(targets) {
4857
const name = 'SyntheticShadow';
4958
const targetName = 'synthetic-shadow';
@@ -72,6 +81,10 @@ function buildWireService(targets) {
7281
...buildEngineTargets(COMMON_TARGETS),
7382
...buildSyntheticShadow(COMMON_TARGETS),
7483
...buildWireService(COMMON_TARGETS),
84+
...buildEngineServerTargets([
85+
{ target: 'es2017', format: 'commonjs', prod: false },
86+
{ target: 'es2017', format: 'commonjs', prod: true },
87+
]),
7588
];
7689
process.stdout.write('\n# Generating LWC artifacts...\n');
7790
await generateTargets(allTargets);

0 commit comments

Comments
 (0)