<commit_before>import { movies, movie } from "./api";

export default [
  {
    name: "Home",
    path: "",
    on: {
      initial: () =>
        Promise.all([
          import("./pages/Home").then(module => module.default),
          movies() /* the movies don't change */
        ])
    },
    response({ resolved }) {
      const [body, data] = resolved.initial;
      return {
        body,
        data
      };
    }
  },
  {
    name: "Movie",
    path: "movie/:id",
    on: {
      initial: () => import("./pages/Movie").then(module => module.default),
      every: ({ params }) => movie(params.id)
    },
    response({ resolved }) {
      const modifiers = {
        body: resolved.initial
      };
      if (resolved.error) {
        modifiers.error = resolved.error;
      } else {
        modifiers.data = resolved.every;
      }
      return modifiers;
    }
  },
  {
    name: "Not Found",
    path: "(.*)",
    on: {
      initial: () => import("./pages/NotFound").then(module => module.default)
    },
    response({ resolved }) {
      return {
        body: resolved.initial
      };
    }
  }<commit_msg>(examples) Modify Vue import for CodeSandbox [ci skip]<commit_after>import { movies, movie } from "./api";

export default [
  {
    name: "Home",
    path: "",
    on: {
      initial: () =>
        Promise.all([
          import("./pages/Home").then(
            module => (module.default ? module.default : module)
          ),
          movies() /* the movies don't change */
        ])
    },
    response({ resolved }) {
      const [body, data] = resolved.initial;
      return {
        body,
        data
      };
    }
  },
  {
    name: "Movie",
    path: "movie/:id",
    on: {
      initial: () =>
        import("./pages/Movie").then(
          module => (module.default ? module.default : module)
        ),
      every: ({ params }) => movie(params.id)
    },
    response({ resolved }) {
      const modifiers = {
        body: resolved.initial
      };
      if (resolved.error) {
        modifiers.error = resolved.error;
      } else {
        modifiers.data = resolved.every;
      }
      return modifiers;
    }
  },
  {
    name: "Not Found",
    path: "(.*)",
    on: {
      initial: () =>
        import("./pages/NotFound").then(
          module => (module.default ? module.default : module)
        )
    },
    response({ resolved }) {
      return {
        body: resolved.initial
      };
    }
  }
{'fraction_non_alphanumeric': 0.16659877800407333, 'fraction_numerical': 0.0, 'mean_word_length': 1.6494066882416396, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1349152', 'n_tokens_mistral': 746, 'n_tokens_neox': 738, 'n_words': 152}