lisonge / vite-plugin-monkey

A vite plugin server and build your.user.js for userscript engine like Tampermonkey, Violentmonkey, Greasemonkey, ScriptCat
MIT License
1.41k stars 72 forks source link

将Antd写入externalGlobals后,打包的文件运行报错 #158

Closed laicengfan closed 6 months ago

laicengfan commented 6 months ago

vite配置: image

构建require: image

报错信息: image

请问下这个报错信息是怎么回事呢

lisonge commented 6 months ago

add dayjs after ReactDOM

        externalGlobals: {
          react: cdn.jsdelivr('React', 'umd/react.production.min.js'),
          'react-dom': cdn
            .jsdelivr('ReactDOM', 'umd/react-dom.production.min.js')
            .concat('https://cdn.jsdelivr.net/npm/dayjs'),
        },
laicengfan commented 6 months ago

3q!