kiliman / remix-express-vite-plugin

This package includes a Vite plugin to use in your Remix app. It configures an Express server for both development and production using TypeScript.
118 stars 6 forks source link

Hardcoded references to build paths build/index.js #20

Closed thomaswelton closed 3 months ago

thomaswelton commented 3 months ago

I'm migrating an existing application to remix and have a vite config similar to

export default defineConfig({
  plugins: [
    expressDevServer(),
    remix({
        buildDirectory: "remix-build",
        serverBuildFile: "index.mjs",
    })]
});

In the remix config I specify a custom build directory and filename for the server build file. In our setup this is required as I want to be able to keep the existing application setup, and run the new remix app alongside it until we complete our migration.

However this file https://github.com/kiliman/remix-express-vite-plugin/blob/main/packages/remix-create-express-app/src/index.ts Contains hardcoded references to the build directory and the index.js file.

I propose that these options be configurable in the expressDevServer plugin, or where possible read from the config used in the remix plugin