This snowpack plugin will handle the baseUrl. That means it will make it possible to run several snowpack applications under one domain with help of a proxy passing webserver, such NGINX.
%BASE_URL% as a prefix to every urls that is pointing towards the applications public folder. Ex.
const MyImage = <img src="%BASE_URL%/my-image.jpg" />
Note: It is not recommended to use this plugin at the same time of usage of baseUrl configuration within the snowpack configuration.
moduleexports =plugins:"snowpack-plugin-baseurl-handler"exts: ".html" ".js" ".jsx" ".css" // Add those file extensions you want to be affected by this pluginbaseUrl: '/my-custom-base-url' // Path where the snowpack app is located within the web serverdebug: true // Debug output during build process. Default: false.
Note: The plugin will override baseurl configuration with the value
'' when running in