Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to fix it? my error is: Mirage: Passthrough request for GET /_next/static/development/_devMiddlewareManifest.json #1078

Open
CaiquePrado opened this issue Jan 18, 2023 · 0 comments

Comments

@CaiquePrado
Copy link

import { createServer, Factory, Model } from "miragejs";
import { faker } from "@faker-js/faker";

type User = {
name: string;
email: string;
created_at: string;
};

export function makeServer() {
const server = createServer({
models: {
user: Model.extend<Partial>({}),
},

factories: {
  user: Factory.extend({
    name(i: number) {
      return `User${i + 1}`;
    },
    email() {
      return faker.internet.email().toLowerCase();
    },
    createdAt() {
      return faker.date.recent(10);
    },
  }),
},

seeds(server) {
  server.createList("user", 200);
},

routes() {
  this.namespace = "api";
  this.timing = 750;

  this.get("/users");
  this.post("/users");

  this.namespace = "";

  this.passthrough();
},

});

return server;
}
``

@CaiquePrado CaiquePrado changed the title How to fix it? How to fix it? my error is: Mirage: Passthrough request for GET /_next/static/development/_devMiddlewareManifest.json Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant