Skip to content

Commit

Permalink
feat: webpack 配置 loader 使用 css-loader 和 style-loader 处理样式
Browse files Browse the repository at this point in the history
  • Loading branch information
yangjin committed Dec 2, 2019
1 parent 04dbf73 commit c66ef70
Show file tree
Hide file tree
Showing 6 changed files with 668 additions and 26 deletions.
3 changes: 3 additions & 0 deletions demo/webpack-demo/app/createImg.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// 引入样式
import "./../style/img.css";

let smallImg = document.createElement('img');
smallImg.src = require('./../images/nx-small.png'); // 必须 require 进来
document.body.appendChild(smallImg);
Expand Down
Loading

0 comments on commit c66ef70

Please sign in to comment.