Skip to content

Commit

Permalink
init jq
Browse files Browse the repository at this point in the history
  • Loading branch information
yyccQQu committed Jan 29, 2019
1 parent 9e68e20 commit e4cbd2d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.js"></script>
</head>
<style>
body {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

// import $ from 'expose-loader?$!jquery'
// expose-loader 暴露 全局的loader 内联的loader
import $ from "jquery";
// import $ from "jquery";
// console.log($,'///',window.$)

//直接取 jquery
Expand Down
6 changes: 3 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ module.exports = {
$: "jquery" //在每个模块中注入$
})
],
externals:{
jquery: "$" //第三方引入模块儿,不用打包
},
// externals:{
// jquery: "$" //第三方引入模块儿,不用打包
// },
module: {
// loader 默认 从右向左 从下到上
rules: [
Expand Down

0 comments on commit e4cbd2d

Please sign in to comment.