choojs / bankai

:station: - friendly web compiler
Apache License 2.0
1.09k stars 102 forks source link

Production build served from a subfolder #512

Open aksperiod opened 5 years ago

aksperiod commented 5 years ago

My app will live in a subfolder on my domain, however after bankai build, the css and js bundles are loaded from the domain root because they start with a forward slash. Is it possible to change this?

goto-bus-stop commented 5 years ago

You can do:

bankai build app.js --base /sub/dir

That will generate tags like <script src="/sub/dir/HASH_HERE/bundle.js"></script>