kinow commented on issue #2392:
URL: https://github.com/apache/jena/issues/2392#issuecomment-2040607415

   >The idea of editing the generated file after its built ... is a bit risky!
   
   Agreed!
   
   >The webpack to vite change Jan2023, just after 4.7.0, added the index.html 
in the source tree. But the (after /static" to "static" experiment) also has
   
   This might explain it :point_up: 
   
   >@kinow - Ok but how does the build know to put in src="/static and 
href="/static. Looking for a way to control control the content.
   
   We can control that with the `base` setting in `vite.config.js` (we don't 
have it, but it can be added right at the top - 
https://vitejs.dev/guide/build#public-base-path
   
   ```diff
   diff --git a/jena-fuseki2/jena-fuseki-ui/vite.config.js 
b/jena-fuseki2/jena-fuseki-ui/vite.config.js
   index 4c8bee28c9..f6374b7596 100644
   --- a/jena-fuseki2/jena-fuseki-ui/vite.config.js
   +++ b/jena-fuseki2/jena-fuseki-ui/vite.config.js
   @@ -23,6 +23,7 @@ const path = require("path")
    
    // https://vitejs.dev/config/
    export default defineConfig({
   +  base: '/something/static/',
      plugins: [
        vue(),
        istanbul({
   ```
   
   Or to test without modifying files:
   
   ```bash
   $ yarn build --base=/something/static/
   $ python3 -m http.server -d target/webapp 8000
   ```
   
   Visit <http://localhost:8000>, and the files included in `index.html` should 
be going to something like 
<http://localhost:8000/something/static/static/index-PkYBuHRI.js>.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to