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

amd在页面中加载有问题, #1

Open
z-z-k opened this issue Nov 2, 2021 · 0 comments
Open

amd在页面中加载有问题, #1

z-z-k opened this issue Nov 2, 2021 · 0 comments

Comments

@z-z-k
Copy link

z-z-k commented Nov 2, 2021

改为 data-main 引入就正常了

$('head').append(
                $('<script></script>').attr('src', requirejs).attr('data-main', entries[0])
            );
            // $('head').append(
            // 	$('<script></script>').html(`require(${JSON.stringify(entries)})`)
            // );

通过你的代码实现了vite的ie9兼容
https://gitee.com/ZZK-1989/vite-plugin-amd-babel.git

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