yasithdev opened a new pull request, #148:
URL: https://github.com/apache/airavata-portals/pull/148

   ## Summary
   `static/common` migrated to Vite in #144, which emits **ES module** bundles 
(each entry statically imports a shared chunk, e.g. `_commonjsHelpers.js`). The 
root `templates/base.html` still:
   - referenced the Vue-CLI `chunk-vendors` split bundle, which Vite does not 
produce → `render_bundle 'chunk-vendors' …` raises `WebpackBundleLookupError` 
on **every** page; and
   - loaded the `app`/`notices` bundles as classic `<script 
type="text/javascript">`, which cannot execute ESM (`import` outside a module).
   
   This loads the COMMON bundles via `get_files` + `<script type="module">` 
(URLs come from the same Vite-emitted `webpack-stats.json`, so the 
Django/webpack-loader config is otherwise unchanged) and drops the dead 
`chunk-vendors` lines. The inline `window.AiravataPortalSessionData` script 
remains a classic script and still runs before the deferred module bundles, so 
session init ordering is preserved.
   
   ## Test plan
   - `templates/base.html` compiles via Django's template loader (all tags 
parse).
   - `manage.py check` — no issues.
   - Offline render against the committed Vite stats confirms `<script 
type="module" src="/static/common/dist/js/app.js"></script>` is emitted and the 
old `chunk-vendors` lookup raised before the fix.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to