Closed answershuto closed 2 years ago
getData support static prefetch for web.
export const getData = { "key": "key_1", "prefetchType": "mtop", "api": "mtop.tmall.kangaroo.core.service.route.pagerecommendservice", "v": "1.0", "data": { "param1": "v1", "param2": "v2" }, "extHeaders": { "nameAaaa": "112233" } };
const plugin = () => ({ name: 'plugin-mtop-prefetch', setup: ({ generator }) => { generator.addDataLoaderImport({ source: '@ali/universal-mtop', exportAlias: { request: 'fetcher', }, specifier: ['request'], }); }, }); export default plugin;
The latest updates on your projects. Learn more about Vercel for Git ↗︎
getData support static prefetch for web.