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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.import() is deprecated and will be removed soon. Use import() instead. #2446

Open
wangshuqing opened this issue Dec 17, 2022 · 1 comment

Comments

@wangshuqing
Copy link

Hi! 馃憢

Firstly, thanks for your work on this project! 馃檪

Today I used patch-package to patch systemjs@6.8.3 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/systemjs/dist/system.js b/node_modules/systemjs/dist/system.js
index 1cbf2ba..7f0bb75 100644
--- a/node_modules/systemjs/dist/system.js
+++ b/node_modules/systemjs/dist/system.js
@@ -529,7 +529,7 @@
         script.sp = true;
         if (!script.src)
           return;
-        System.import(script.src.slice(0, 7) === 'import:' ? script.src.slice(7) : resolveUrl(script.src, baseUrl)).catch(function (e) {
+          envGlobal.System.import(script.src.slice(0, 7) === 'import:' ? script.src.slice(7) : resolveUrl(script.src, baseUrl)).catch(function (e) {
           // if there is a script load error, dispatch an "error" event
           // on the script tag.
           if (e.message.indexOf('https://git.io/JvFET#3') > -1) {

This issue body was partially generated by patch-package.

@tbrannam
Copy link

tbrannam commented Jun 2, 2023

what were you building that emitted that warning?

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

2 participants