Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpack 完全教程-03-快速上手 #59

Open
GuoYongfeng opened this issue Jul 24, 2016 · 0 comments
Open

webpack 完全教程-03-快速上手 #59

GuoYongfeng opened this issue Jul 24, 2016 · 0 comments

Comments

@GuoYongfeng
Copy link
Member

快速上手

$ mkdir webpack-demos 
$ cd webpack-demos
$ touch .gitignore README.md 
$ npm init
$ touch entry.js index.html 

entry.js

document.write("一起轻松学习webpack.");

index.html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Webpack 完全教程</title>
</head>
<body>
  <script src="./bundle.js"></script>
</body>
</html>

安装和编译

$ npm install webpack -g
$ webpack entry.js bundle.js

编译信息

Hash: 07146fa86952be132cbc
Version: webpack 1.13.1
Time: 63ms
    Asset     Size  Chunks             Chunk Names
bundle.js  1.42 kB       0  [emitted]  main
   [0] ./entry.js 35 bytes {0} [built]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant