【发布时间】:2018-04-12 19:56:21
【问题描述】:
我使用 VS 2017 中的 Asp Core+webpack+ Angular 4 模板。如何加载 jQuery-ui, 我把它放到 webpack.config.vendor.js 中:
const treeShakableModules = [
'@angular/animations',
'@angular/common',
'@angular/compiler',
'@angular/core',
'@angular/forms',
'@angular/http',
'@angular/platform-browser',
'@angular/platform-browser-dynamic',
'@angular/router',
'font-awesome/css/font-awesome.css',
'zone.js',
'virtual-keyboard',
'jquery-ui' //Here
但我不认为这是正确的
将 js/css 文件包含到 webpack 的正确方法是什么?
谢谢
【问题讨论】:
-
找到了这个 npmjs.com/package/webpack-jquery-ui 但添加了这两行 require('webpack-jquery-ui');需要('webpack-jquery-ui/css');给出错误
标签: node.js angular jquery-ui npm webpack