You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: part1/README.md
+42-44Lines changed: 42 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,6 @@ make a pull request.
30
30
*[Bundling](#bundling)
31
31
*[Loaders](#loaders)
32
32
*[Plugins](#plugins)
33
-
<<<<<<< HEAD
34
33
*[Your Config File](#your-config-file)
35
34
*[A Minimal Example](#a-minimal-example)
36
35
*[Introducing Plugins](#introducing-plugins)
@@ -41,18 +40,6 @@ make a pull request.
41
40
*[Start Coding](#start-coding)
42
41
*[Conclusion](#conclusion)
43
42
*[Closing Thoughts](#closing-thoughts)
44
-
=======
45
-
*[你的設定檔案](#your-config-file)
46
-
*[一個簡單的範例](#a-minimal-example)
47
-
*[介紹 Plugins](#introducing-plugins)
48
-
*[一個更完整的範例](#a-more-complete-example)
49
-
*[介紹 Loaders](#introducing-loaders)
50
-
*[加入更多 Plugins](#adding-more-plugins)
51
-
*[開發伺服器](#the-development-server)
52
-
*[開始撰寫程式](#start-coding)
53
-
*[結論](#conclusion)
54
-
*[結束後的思考](#closing-thoughts)
55
-
>>>>>>> bd62391... translate ex5 ex6
56
43
57
44
## Why Webpack?
58
45
@@ -367,17 +354,10 @@ MyDirectory
367
354
368
355
#### Contents
369
356
370
-
<<<<<<< HEAD
371
357
1.[Introducing Loaders](#introducing-loaders) - We will add loaders, which allow us to add CSS to our bundle.
372
358
2.[Adding More Plugins](#adding-more-plugins) - We will add a plugin that'll help us create/use an HTML file.
373
359
3.[The Development Server](#the-development-server) - We'll split our webpack config into separate `development` and `production` files. Then use the webpack-dev-server to view our website and enable HMR.
374
360
4.[Start Coding](#start-coding) - We will actually write some JavaScript.
現在我們想要實際在瀏覽器看到我們的網站,需要一個 web 伺服器來服務我們的程式碼。webpack 自帶了方便的 `webpack-dev-server`,你需要在本機和全域安裝。
538
+
Now we want to actually see our website in the browser, which requires a web server to serve our
539
+
code. Conveniently, webpack comes with the `webpack-dev-server`, which you need to install both
540
+
locally and globally
559
541
560
542
npm install -g webpack-dev-server
561
543
npm install --save-dev webpack-dev-server
562
544
563
-
dev server 可以在瀏覽器看到你的網站是怎麼樣子以及可以更快速的開發,是一個相當有用的資源。預設情況下你可以拜訪 `http://localhost:8080`。不幸的是,像是 hot reloading 的功能並不是內建的,還需要一些其他的設定。
545
+
The dev server is an extremely useful resource for seeing what your website looks like in the browser, and more rapid development. By default you can visit it at `http://localhost:8080`. Unfortunately, features such as hot reloading don't work out of the box, and require some more configuration.
Copy file name to clipboardExpand all lines: part1/example6/README.md
+39-21Lines changed: 39 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,18 @@
1
-
# 範例六 - 開發伺服器
1
+
# Example 6 - The Development Server
2
2
3
-
現在我們想要實際在瀏覽器看到我們的網站,需要一個 web 伺服器來服務我們的程式碼。webpack 自帶了方便的 `webpack-dev-server`,你需要在本機和全域安裝。
3
+
Now we want to actually see our website in the browser, which requires a web server to serve our
4
+
code. Conveniently, webpack comes with the `webpack-dev-server`, which you need to install both
5
+
locally and globally
4
6
5
7
npm install -g webpack-dev-server
6
8
npm install --save-dev webpack-dev-server
7
9
8
-
dev server 可以在瀏覽器看到你的網站是怎麼樣子以及可以更快速的開發,是一個相當有用的資源。預設情況下你可以拜訪 `http://localhost:8080`。不幸的是,像是 hot reloading 的功能並不是內建的,還需要一些其他的設定。
10
+
The dev server is an extremely useful resource for seeing what your website looks like in the browser, and more rapid development. By default you can visit it at `http://localhost:8080`. Unfortunately, features such as hot reloading don't work out of the box, and require some more configuration.
0 commit comments