我正在使用SimpleMDE,它似乎在内部向/node_modules/typo-js/dictionaries/en_US/en_US.dic
发送请求。
如何使用Mirage传递此GET请求?
我使用以下设置但没有效果。
this.passthrough('node_modules/**');
this.passthrough('node_modules/typo-js/dictionaries/en_US/en_US.dic');
this.passthrough('/node_modules/**');
this.passthrough('/node_modules/typo-js/dictionaries/en_US/en_US.dic');
mirage配置文件中的代码,
export default function() {
this.urlPrefix = 'http://localhost:3000';
this.namespace = '';
this.timing = 400;
/*
Shorthand cheatsheet:
this.get('/posts');
this.post('/posts');
this.get('/posts/:id');
this.put('/posts/:id'); // or this.patch
this.del('/posts/:id');
http://www.ember-cli-mirage.com/docs/v0.2.x/shorthands/
*/
this.passthrough('https://cdn.jsdelivr.net/**');
this.passthrough('/node_modules/typo-js/dictionaries/en_US/en_US.dic');
this.passthrough('/node_modules/typo-js/dictionaries/en_US/en_US.dic')
this.passthrough();
}