Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] #2408

Open
qinpeifeng opened this issue Nov 20, 2024 · 0 comments
Open

[bug] #2408

qinpeifeng opened this issue Nov 20, 2024 · 0 comments

Comments

@qinpeifeng
Copy link

Describe the bug

To Reproduce

1. introduce Sortable.min.js via AMD by define(e);

(在AMD模式下,直接引入Sortable.min.js,源码是直接通过define(e),定义引用Sortable)

image

2. requirejs source code will report the error: " Uncaught Error: Mismatched anonymous define() module"

(requirejs 会报错:" Uncaught Error: Mismatched anonymous define() module")
see the error:
specific reasons:on the step1: define(e), the name is null, causing the following code to error
(具体原因:因为第一步中是直接 define(e),没有明确模块的name,导致requirejs 以下代码码未代码报错)

image

3. to fix: modify Sortable.min.js source code ,define the introduction in the following way to solve the problem.

(修改方法:在Sortable.min.js源代码,按照以下方式修改definy引入方式,解决问题。)

define("Sortable", function(Sortable) { return (t.Sortable = e(Sortable)) })

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant