umijs / umi

A framework in react community ✨
https://umijs.org
MIT License
15.3k stars 2.65k forks source link

配置 版本umi3 umi-plugin-apollo 报 Path must be a string #6202

Closed hqylss111 closed 3 years ago

hqylss111 commented 3 years ago

配置如下: import { defineConfig } from 'umi';

export default defineConfig({ nodeModulesTransform: { type: 'none', }, routes: [ { path: '/', component: '@/pages/index' }, ], fastRefresh: {}, publicPath: '/', plugins: [ ['umi-plugin-apollo', {/ uri: 'https://my.endpoint.com/graphql', mock: true, hooksImportFrom: 'react-apollo-hooks', options: 'path/to/options/file', /}], ] });

sorrycc commented 3 years ago

umi-plugin-apollo 是 umi 2 的插件,不适用于 umi 3。