使用 npm 添加
jquery
包webpack 配置添加 jquery插件
module.exports = merge(baseWebpackConfig, { ... plugins: [ new webpack.ProvidePlugin({ $: 'jquery' }) ] }
在项目JavaScript中直接 使用
$
即可调用jquery.
Previous

2017-06-15
Next

2017-06-10