Justin
Justin
确实有这个问题,暂时写了个脚本启动前在ES文件写入了export const theme = null;临时解决了下,不然vite下完全用不了。
> 是在antd/es/index.js文件下追加一个"export const theme = null;"
> > 确实有这个问题,暂时写了个脚本启动前在ES文件写入了export const theme = null;临时解决了下,不然vite下完全用不了。 > > 照你的方法处理完以后还会有新的错误 `Remix App Server started at http://localhost:3000 (http://172.16.0.232:3000) /Users/user/test-proj/node_modules/@ant-design/pro-components/es/index.js:1 export * from '@ant-design/pro-card'; ^^^^^^ > > SyntaxError: Unexpected token 'export' at...
> > > > 这个配置是添加在哪里的? > > @xukechu node_modules/antd/es/index.js
```js function detectType(val){ return Object.prototype.toString.call(val).split(' ')[1].split(']')[0].toLowerCase(); } ``` 不考虑兼容性的话,这样写有其他的问题吗?
```js else if (iteratee) { if (seen.indexOf(computed) === -1) { seen.push(computed); res.push(value); } } ``` 为什么这一段的时候,里面的判断要用seen呢?直接用res不好吗?