通常引入的方式:
// import jrJS from ‘./common/jrAPI.js’;
动态引入方式:
let jrJS = ‘’;
let str = ‘jrAPI.js’;
import(’./common/’+str).then(res => {
jrJS = res;
});
require的动态引入方式和上面一样;
通常引入的方式:
// import jrJS from ‘./common/jrAPI.js’;
动态引入方式:
let jrJS = ‘’;
let str = ‘jrAPI.js’;
import(’./common/’+str).then(res => {
jrJS = res;
});
require的动态引入方式和上面一样;