Remix Js/V2/Nodejs Module Exports Server Build Directory To Path

1.0.0Last update Sep 3, 2024
by@dfordp

In your remix.config.js, rename serverBuildDirectory to serverBuildPath and specify a module path, not a directory.

Before

/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
serverBuildDirectory: './build',
};

After

/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
serverBuildPath: './build/index.js',
};

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now