Skip to content

Commit c13a748

Browse files
authored
chore(web-components): update build-dist (#20037)
1 parent 3e57249 commit c13a748

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

packages/web-components/tasks/build-dist.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,19 @@ async function buildDist() {
6161
}
6262
}
6363

64-
// Generates the multi-input for the rollup config
65-
const inputs = folders.reduce((acc, folder) => {
66-
acc[`components/${folder}/index`] = `src/components/${folder}/index.ts`;
67-
return acc;
68-
}, {});
64+
// Generate inputs with flat file names
65+
const inputs = {};
66+
folders.forEach((folder) => {
67+
inputs[`${folder}.min`] = `src/components/${folder}/index.ts`;
68+
});
6969

7070
return rollup(getRollupConfig({ inputs }))
7171
.then((bundle) => {
7272
bundle.write({
7373
format: 'es',
7474
dir: 'dist',
75-
preserveModules: true,
76-
preserveModulesRoot: 'src',
77-
entryFileNames: '[name].min.js',
75+
// This ensures output files are named based on input keys
76+
entryFileNames: '[name].js',
7877
banner: 'let process = { env: {} };',
7978
});
8079
})

0 commit comments

Comments
 (0)