lasso-js / lasso

Advanced JavaScript module bundler, asset pipeline and optimizer
582 stars 75 forks source link

routePrefix fix #241

Closed kuznetsov-online closed 7 years ago

kuznetsov-online commented 7 years ago

urlPrefix can be full url

patrick-steele-idem commented 7 years ago

@austinkelleher do you mind reviewing this?

patrick-steele-idem commented 7 years ago

Thanks for the PR Alexander. Can you please more details on the problem this change solves? Maybe some sample code?

kuznetsov-online commented 7 years ago

I using marko & lasso for widget server. Widget can be connected to any site over js include () With out this fix all dependences try loading from site, but not from my server widget. I have tried put full url in urlPrefix, but serveStatic() won't work correctly. This fix extracting only pathname from urlPrefix and putting to the routerPrefix.

patrick-steele-idem commented 7 years ago

Thank you for clarifying. Makes sense 👍

kuznetsov-online commented 7 years ago

and.. marko & lasso are awesome! thank you very much, I love them from first look! ;-)

austinkelleher commented 7 years ago

@FiW Thanks a lot for this fix! I pulled down your branch, picked your commit, and fixed the merge conflicts. The reason for your conflict is because recently we made changes to support a dist folder, which would get served to Node 6 users. If you're on Node 8+, you will get the standard source code. We've moved the source code to the src directory.

Your commit landed here: https://github.com/lasso-js/lasso/commit/30fe2ba094d3972ea34836eb5381f949e83a9265 Published lasso@3.0.0-beta.8

Also backported your fixed to lasso@2.11.17.