NON_TOP_LEVEL_STATEMENT_DEFINE error when trying to process a CommonJS module
Description
The process for converting CommonJS and AMD modules is the same except for one step. We forgot to add a module type check for this one step, meaning that AMD and CommonJS are currently processed exactly the same, which results in the following error:
ERROR: NON_TOP_LEVEL_STATEMENT_DEFINE. The define function must be called as a top-level statement. at libs/d3.js line 9501 : 50
The process for converting CommonJS and AMD modules is the same except for one step. We forgot to add a module type check for this one step, meaning that AMD and CommonJS are currently processed exactly the same, which results in the following error:
ERROR: NON_TOP_LEVEL_STATEMENT_DEFINE. The define function must be called as a top-level statement. at libs/d3.js line 9501 : 50