当我使用命令“量角器protractor.config.js”时,我得到这个错误:[16:57:17_compile (internal/modules/cjs/loader.js:1122:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:11
但是,使用没有默认导出的模块(immutable.js、moment.js、.)有问题。根据类型脚本(look ),只能在以下语句中使用这些模块:import x = require('x')或import * as x from 'x',但这两种语句都会在汇总过程中造成问题。在某些情况下,我在rollup:Cannot call a namespace ('x')期间得到一个错误,在
/example1.js)语句时,example1.js文件中的代码将包含在包中。如果我只使用import Example2 from './example2.js',那么example2.js中的代码也会包含在包中。但是,如果我同时使用这两种语句,那么只有import在工作,而require不起作用。
我正在使用卷起进行捆绑。rollup-