How to import? the old code base

there is a js file left by our predecessors, and the outermost layer is an IIFE, but the project is webpack + vue. If you want to use import and other methods to import, of course, direct import is an error, Syntax Error: Deleting local variable in strict mode . May I ask how to solve this situation?

Mar.05,2021

if only import goes out, the function import can be executed outside, or the result import can be executed by executing the function.
but since the original code itself does not support import , there is a question mark over whether there may be other module dependencies and whether they may depend on any global variables.

Menu