Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit ba06ca5

Browse files
committed
fix: if productName contains spaces, headless bundle files have spaces
we already turn "MyProduct" into "myproduct.js" as a bundle file name. i think it also makes sense to turn "My Product" into "my-product.js", to avoid downstream complications with filenames with spaces. BREAKING CHANGE: this PR will thus break builds that assumed "my product.js"
1 parent 61a46fa commit ba06ca5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/webpack/headless-webpack.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,13 @@ kuiPluginExternals.forEach(_ => {
176176
externals[_] = _
177177
})
178178

179-
const config = (entry, target, extraPlugins = [], filename = productName.toLowerCase(), nameSuffix = '') => ({
179+
const config = (
180+
entry,
181+
target,
182+
extraPlugins = [],
183+
filename = productName.toLowerCase().replace(/\s/g, '-'),
184+
nameSuffix = ''
185+
) => ({
180186
context: process.env.CLIENT_HOME,
181187
stats: {
182188
// while developing, you should set this to true

0 commit comments

Comments
 (0)