Skip to content

Commit 955d174

Browse files
authored
Fix missing osd-ui-framework dist CSS in production build (#12223)
After grunt was removed, packages/osd-ui-framework/package.json still declares opensearchDashboards.build.intermediateBuildDirectory: 'target', but its 'build' script ('grunt prodBuild') that used to populate target/ was deleted (scripts is now empty). In the production build (@osd/pm buildProductionProjects) the per-project flow is: deleteTarget() wipes target/, buildProject() is now a no-op (no build script, no build targets), copyToBuild() then copies from the empty target/. As a result only package.json is shipped and the committed dist/kui_*.css files are dropped from node_modules/@osd/ui-framework. At runtime core_app.ts serves /node_modules/@osd/ui-framework/dist/{path*} from disk, so the missing kui_*.css returns a JSON 404 and the browser blocks it on an X-Content-Type-Options: nosniff MIME-type mismatch, briefly flashing the fatal-error (red) banner on initial load. The KUI stylesheets are now pre-compiled and committed in dist/, so no build step is required. Remove the stale intermediateBuildDirectory so the package is shipped from its source root (which contains dist/). The build's CleanExtraBuildFiles task strips source .scss/tests/docs from node_modules while preserving .css. Verified with a full distributable build: node_modules/@osd/ui-framework/dist/ now contains all six kui_*.css files (kui_v9_light.css included). Signed-off-by: Justin Kim <jungkm@amazon.com>
1 parent cb4c9f9 commit 955d174

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

packages/osd-ui-framework/package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
"version": "1.0.0",
44
"license": "Apache-2.0",
55
"scripts": {},
6-
"opensearchDashboards": {
7-
"build": {
8-
"intermediateBuildDirectory": "target"
9-
}
10-
},
116
"dependencies": {
127
"classnames": "^2.3.1",
138
"lodash": "^4.18.0",

0 commit comments

Comments
 (0)