Webpack - 将`window`暴露为`global`

时间:2016-04-22 05:39:59

标签: webpack

我在Webpack中使用asap包。 The package uses global.如何将global展示为<?php $data = array(); $data['measure'] = ''; $measure=$db->execute("select measure from measures where delet='0'"); while($msrevalues=$measure->fetch_assoc()) { $selected = ($tqmsre['measure']==$msrevalues['measure']) ? 'selected="selected"' : ''; $data['measure'] .= '<option value="'.$msrevalues['measure'].'" '. $selected. '>'.$msrevalues['measure'].'</option>'; } echo json_encode($data); exit(); ?> 与webpack?

1 个答案:

答案 0 :(得分:2)

您可以试用imports-loader。它会像这样:

require('imports-loader?global=window!asap');