Open jesse23 opened 4 years ago
How often can you reproduce it? Have
Description: AMD define doesn't work for dynamic import.
Steps to reproduce:
Given src below:
** * load single module * @param {string} moduleName module name or rel path as key * @returns {Promise} promise with module object */ export function loadModule( moduleName ) { /* if ( /few-button$/.test( moduleName ) ) { return Promise.resolve( FewButton ); } */ return import( moduleName ); }
Compile by rollup to amd mode.
At runtime, use stealJS, try to define a dependency in DSL. It will go through this code and try to load that dep.
The dep JS looks like:
define( [ '//cdn.jsdelivr.net/npm/vue/dist/vue.js', 'lib/httpVueLoader' ], ( Vue, httpVueLoader ) => { ...
In this practice, steal.js will go to a call stack which disabling define explicitly:
Error: define is not a function
Expected results:
Environment:
How often can you reproduce it? Have
Description: AMD define doesn't work for dynamic import.
Steps to reproduce:
Given src below:
Compile by rollup to amd mode.
At runtime, use stealJS, try to define a dependency in DSL. It will go through this code and try to load that dep.
The dep JS looks like:
In this practice, steal.js will go to a call stack which disabling define explicitly:![image](https://user-images.githubusercontent.com/643912/67590424-015b6f00-f729-11e9-9600-74a9a3649a94.png)
Error: define is not a function
.Expected results:
Environment: