Commit 955d174
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 6 | | |
12 | 7 | | |
13 | 8 | | |
| |||
0 commit comments