Learn Remix

route module

entry points

server entry:

import * as entryServer from "app/server.entry"
export { default as assets } from "./assets.json";
export const entry = { module: entryServer };
export const routes = {
  [id]: {
    id: route.id,
    parentId: route.parentId,
    path: route.path,
    index: route.index,
    caseSensitive: route.caseSensitive,
    module: route${index},
  }
  ...
}

client entry:

let entryPoints = {
  "entry.client": path__namespace.resolve(config.appDirectory, config.entryClientFile)
};
 
for (let id of Object.keys(config.routes)) {
  // All route entry points are virtual modules that will be loaded by the
  // browserEntryPointsPlugin. This allows us to tree-shake server-only code
  // that we don't want to run in the browser (i.e. action & loader).
  entryPoints[id] = path__namespace.resolve(config.appDirectory, config.routes[id].file) + "?browser";
}