You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Laravel Mix编译前端资源时Babel模块构建失败求助

Module build failed: this.setDynamic is not a function with Babel 7 setup

I've been stuck with this error for quite some time now, and none of the solutions I found on this site or GitHub have worked.

The error message I'm getting is:

Module build failed: this.setDynamic is not a function

Here's the Babel-related dependencies from my package.json:

"dependencies": {
  "@babel/core": "^7.6.4",
  "babel-core": "^7.0.0-bridge.0",
  "@babel/plugin-syntax-dynamic-import": "^7.2.0",
}

Previously, I ran into the error:

Error: Requires Babel "^7.0.0-0", but was loaded with "6.26.3" #522

So I added "babel-core": "^7.0.0-bridge.0" to try and fix that. My .babelrc file looks like this:

{
  "plugins": ["@babel/plugin-syntax-dynamic-import"]
}

I'd really appreciate any help you can offer. Thank you!

内容的提问来源于stack exchange,提问作者Mohammed

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 07:52:03