inertiajs-adonisjs icon indicating copy to clipboard operation
inertiajs-adonisjs copied to clipboard

Deploying to production

Open watzon opened this issue 3 years ago • 2 comments

First off, great job on this! I had my app deployed to production as a non-ssr application and it was working fine. After getting SSR configured I ran into issues with it saying the module inertia/ssr/ssr.js couldn't be found. Come to find out, it was expecting the inertia/ssr directory to be locted inside of the build directory, but that doesn't seem to happen by default.

I ended up fixing the problem by changing the build directory inside of webpack.ssr.config.js to build/inertia/ssr, but I wanted to know if there's a better way because that just feels kinda hacky.

watzon avatar Dec 19 '22 23:12 watzon

Hey @watzon and Thank you! Glad to know you're using this in production. I'll have to look into this, but in the meanwhile I think your solution is valid. Maybe, to make it more robust you can check NODE_ENV and choose an entrypoint based on that?

eidellev avatar Dec 20 '22 09:12 eidellev

Yeah I'll do that for now, thanks :)

watzon avatar Dec 20 '22 19:12 watzon