feat: mount app on env.URL.pathname
https://github.com/outline/outline/discussions/3871
interesting fact:
https://github.com/outline/outline/blob/086c3ec2d83d6603f8834b0a2ef5229f9638bef4/server/presenters/env.ts#L12-L14
where:
https://github.com/outline/outline/blob/086c3ec2d83d6603f8834b0a2ef5229f9638bef4/app/scenes/Document/components/MultiplayerEditor.tsx#L69-L74
Hey there! It looks like you didn't provide much information here. Please consider adding more details about the issue / pr or it will be automatically closed. Thanks for helping us maintain the project!
I'm not sure what to do with WebpackPwaManifest in webpack.config.js, but publicPath in webpack config would have to be modified.
I'm not sure what to do with WebpackPwaManifest
I'm not sure there is anything you can do as webpack is build-time and the URL configuration is runtime, it may be that the PWA manifest just isn't going to work in this configuration
Hi @frankli0324 – these changes look well considered, but unfortunately they are not compatible with custom domain names per-team which we support in the cloud-hosted version of Outline. The custom domain name functionality relies on many of the paths that you've changed to absolute being relative for this to work correctly.
One way to support both might be to create a relativePath helper that would parse env.URL at startup and prefix the pathname, eg.
env.URL = "https://mycompany.com/wiki"
relativePath("/static/worker.js") -> "/wiki/static/worker.js"
This could then be used anywhere that /... currently is
hmmmm.... what troubles me most is index.html gets generated with {publicPath}/app.[hash].js,css
The custom domain name functionality relies on many of the paths that you've changed to absolute being relative for this to work correctly.
oh....
Not sure if you wanted to take this one across the finish line based on the above suggestion?
I wish so, but I'm quite busy in the last few weeks... maybe next weekend..?