remaxjs / remax

使用真正的 React 构建跨平台小程序
https://remaxjs.github.io/remax/
MIT License
4.57k stars 364 forks source link

[问题] 使用devtools时遇到:ReferenceError: __webpack_exports__ is not defined #1923

Open alex-chan opened 2 years ago

alex-chan commented 2 years ago

问题描述 使用devtools时遇到:ReferenceError: __webpack_exports__ is not defined

示例代码 const less = require("@remax/plugin-less"); const devtool = require("@remax/plugin-devtools"); module.exports = { plugins: [less(), devtool()], };

其他信息

alex-chan commented 2 years ago
 ReferenceError: __webpack_exports__ is not defined
    at Object.node_modulesRemaxReactDevtoolsCoreDistBackendJs (app.js? [sm]:2414)
    at __webpack_require__ (runtime.js? [sm]:80)
    at Module.node_modulesWebpackInjectPluginDistWebpackInjectPluginLoaderJsIdWebpackInjectModule1 (app.js? [sm]:13626)
    at __webpack_require__ (runtime.js? [sm]:80)
    at Object._ (app.js? [sm]:13701)
    at __webpack_require__ (runtime.js? [sm]:80)
    at checkDeferredModules (runtime.js? [sm]:46)
    at Array.webpackJsonpCallback [as push] (runtime.js? [sm]:33)
    at app.js? [sm]:3
    at y (WASubContext.js?t=wechat&s=1654175378900&v=2.17.0:2)(env: Windows,mp,1.06.2206020; lib: 2.17.0)
alex-chan commented 2 years ago

build成功后在微信开发者工具上显示的

fewoy commented 2 years ago

我也遇到了,请问解决了吗

xavieryang2011 commented 2 years ago

同问

fewoy commented 2 years ago

使用--no-devtools,可以规避这个问题