From efe24b62bbc73f23ad43f275455cf118fb750e53 Mon Sep 17 00:00:00 2001 From: Jimkwan Date: Fri, 8 Mar 2019 16:00:53 +0800 Subject: [PATCH] [Update] Add warn of using addModules --- src/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/index.ts b/src/index.ts index a7d7b53..0ac188d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -39,6 +39,12 @@ class Sval { } } + // Compatible + addModules(modules: { [name: string]: any }) { + console.warn('Use import instead. addModules is deprecated and will be removed soon.') + this.import(modules) + } + import(nameOrModules: string | { [name: string]: any }, mod?: any) { const win = this.scope.find('window').get()