8000 webpack 完全教程-03-快速上手 · Issue #59 · iuap-design/blog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
webpack 完全教程-03-快速上手 #59
Open
@GuoYongfeng

Description

@GuoYongfeng

快速上手

$ 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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0