【问题标题】:can't import ui-select in angularjs and ES6无法在 angularjs 和 ES6 中导入 ui-select
【发布时间】:2017-10-06 06:48:58
【问题描述】:

我正在尝试使用 yarn 和 webpack 在我的 js 文件中导入 ui-select,而不是将其导入我的模块中,如下所示。

import ngSanitize from 'angular-sanitize';
import uiselect from 'ui-select';
import 'ui-select/dist/select.css';

export default angular.module('app.module', [
/** ... **/
ngSanitize,
'ui.select'
/** ... **/
])

但是当我检查生成的 css 文件时,我可以看到 CSS 已正确导入,但没有 js。(我的 webpack 配置没有问题,因为我可以在生成的供应商文件上看到 ngSanitize js 代码)

【问题讨论】:

    标签: javascript angularjs webpack ui-select


    【解决方案1】:

    这似乎是正确的ui-select github issue

    您能否分享有关您的 webpack.config.js 文件的更多详细信息,可能是您在另一个输出文件中生成它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-05-04
      • 2015-05-17
      • 2017-05-09
      • 2016-11-26
      • 1970-01-01
      • 2016-10-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多