cixing

Results 18 comments of cixing

> > throttle(防抖)和 debounce(节流) > > 写反了 没写反啊

> 我看不出來這個錯誤和 rollup-plugin-external-globals 的關聯是什麼 ```js import { defineConfig } from 'vite'; import react from "@vitejs/plugin-react"; import { createHtmlPlugin } from 'vite-plugin-html'; import { useDynamicPublicPath } from 'vite-plugin-dynamic-publicpath'; // import createExternal...

> 我看不出來這個錯誤和 rollup-plugin-external-globals 的關聯是什麼 vite配置使用了一下这个插件 就报错了

> 1. 程式碼怪怪的,例如 > ```js > if (mode === 'serve') { > ``` > > > > > > > > > > > > 這行是不是該改成 > ```js > if...

> > 1. 程式碼怪怪的,例如 > > ```js > > if (mode === 'serve') { > > ``` > > > > > > > > > > > > >...

好的,感谢,我去试试 ------------------ 原始邮件 ------------------ 发件人: eight ***@***.***> 发送时间: 2022年5月27日 04:16 收件人: eight04/rollup-plugin-external-globals ***@***.***> 抄送: cixing ***@***.***>, Author ***@***.***> 主题: Re: [eight04/rollup-plugin-external-globals] 不支持React (Issue #26) 你可以試著插入一個自定的 plugin,印出 externalGlobals 處理後的程式碼︰ ... rollupOptions:...

> > > > > > > > > > > > 老哥你解决了吗 > > > 最近想把老项目移植到vite,react也报这个错,大佬解决没啊? import { viteExternalsPlugin } from 'vite-plugin-externals';

> > 解决了。 1、使用vite-plugin-externals ,本issue的插件没这样试过,应该也可以。 2、 ![image](https://user-images.githubusercontent.com/26957327/176877093-544eb1d9-626d-49a0-a409-87e831dd2e00.png)