Skip to content

Commit 02e7703

Browse files
chalkpekazupon
authored andcommitted
Webpack to webpack (#835)
1 parent 08e43c7 commit 02e7703

16 files changed

+31
-31
lines changed

โ€Ždocs/en/hot-reload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hot Reloading
22

3-
Vuex supports hot-reloading mutations, modules, actions and getters during development, using Webpack's [Hot Module Replacement API](https://webpack.github.io/docs/hot-module-replacement.html). You can also use it in Browserify with the [browserify-hmr](https://github.com/AgentME/browserify-hmr/) plugin.
3+
Vuex supports hot-reloading mutations, modules, actions and getters during development, using webpack's [Hot Module Replacement API](https://webpack.github.io/docs/hot-module-replacement.html). You can also use it in Browserify with the [browserify-hmr](https://github.com/AgentME/browserify-hmr/) plugin.
44

55
For mutations and modules, you need to use the `store.hotUpdate()` API method:
66

โ€Ždocs/en/testing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ describe('mutations', () => {
4949

5050
### Testing Actions
5151

52-
Actions can be a bit more tricky because they may call out to external APIs. When testing actions, we usually need to do some level of mocking - for example, we can abstract the API calls into a service and mock that service inside our tests. In order to easily mock dependencies, we can use Webpack and [inject-loader](https://github.com/plasticine/inject-loader) to bundle our test files.
52+
Actions can be a bit more tricky because they may call out to external APIs. When testing actions, we usually need to do some level of mocking - for example, we can abstract the API calls into a service and mock that service inside our tests. In order to easily mock dependencies, we can use webpack and [inject-loader](https://github.com/plasticine/inject-loader) to bundle our test files.
5353

5454
Example testing an async action:
5555

@@ -177,7 +177,7 @@ describe('getters', () => {
177177

178178
### Running Tests
179179

180-
If your mutations and actions are written properly, the tests should have no direct dependency on Browser APIs after proper mocking. Thus you can simply bundle the tests with Webpack and run it directly in Node. Alternatively, you can use `mocha-loader` or Karma + `karma-webpack` to run the tests in real browsers.
180+
If your mutations and actions are written properly, the tests should have no direct dependency on Browser APIs after proper mocking. Thus you can simply bundle the tests with webpack and run it directly in Node. Alternatively, you can use `mocha-loader` or Karma + `karma-webpack` to run the tests in real browsers.
181181

182182
#### Running in Node
183183

@@ -213,7 +213,7 @@ mocha test-bundle.js
213213
#### Running in Browser
214214

215215
1. Install `mocha-loader`
216-
2. Change the `entry` from the Webpack config above to `'mocha!babel!./test.js'`.
216+
2. Change the `entry` from the webpack config above to `'mocha!babel!./test.js'`.
217217
3. Start `webpack-dev-server` using the config
218218
4. Go to `localhost:8080/webpack-dev-server/test-bundle`.
219219

โ€Ždocs/fr/hot-reload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hot Reloading
22

3-
Vuex prend en charge le `hot-reloading` des mutations, modules, actions et getters durant le dรฉveloppement, en utilisant l'[API Hot Module Replacement](https://webpack.github.io/docs/hot-module-replacement.html) de Webpack. Vous pouvez รฉgalement utiliser Browserify avec le plugin [browserify-hmr](https://github.com/AgentME/browserify-hmr/).
3+
Vuex prend en charge le `hot-reloading` des mutations, modules, actions et getters durant le dรฉveloppement, en utilisant l'[API Hot Module Replacement](https://webpack.github.io/docs/hot-module-replacement.html) de webpack. Vous pouvez รฉgalement utiliser Browserify avec le plugin [browserify-hmr](https://github.com/AgentME/browserify-hmr/).
44

55
Pour les mutations et les modules, vous aurez besoin d'utiliser la mรฉthode d'API `store.hotUpdate()` :
66

โ€Ždocs/fr/plugins.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const myPluginWithSnapshot = store => {
7070
}
7171
```
7272

73-
**Les plugins qui peuvent prendre des instantanรฉs ne devraient รชtre utilisรฉs que pendant le dรฉveloppement.** Lorsqu'on utilise Webpack ou Browserify, on peut laisser nos devtools s'occuper de รงa pour nous :
73+
**Les plugins qui peuvent prendre des instantanรฉs ne devraient รชtre utilisรฉs que pendant le dรฉveloppement.** Lorsqu'on utilise webpack ou Browserify, on peut laisser nos devtools s'occuper de รงa pour nous :
7474

7575
``` js
7676
const store = new Vuex.Store({
@@ -81,7 +81,7 @@ const store = new Vuex.Store({
8181
})
8282
```
8383

84-
Le plugin sera utilisรฉ par dรฉfaut. Pour la production, vous aurez besoin de [DefinePlugin](https://webpack.github.io/docs/list-of-plugins.html#defineplugin) pour Webpack ou de [envify](https://github.com/hughsk/envify) pour Browserify pour convertir la valeur de `process.env.NODE_ENV !== 'production'` ร  `false` pour le build final.
84+
Le plugin sera utilisรฉ par dรฉfaut. Pour la production, vous aurez besoin de [DefinePlugin](https://webpack.github.io/docs/list-of-plugins.html#defineplugin) pour webpack ou de [envify](https://github.com/hughsk/envify) pour Browserify pour convertir la valeur de `process.env.NODE_ENV !== 'production'` ร  `false` pour le build final.
8585

8686
### Plugin logger intรฉgrรฉ
8787

โ€Ždocs/fr/testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ describe('mutations', () => {
4949

5050
### Tester les actions
5151

52-
Les actions sont un peu plus compliquรฉes car elles peuvent faire appel ร  des APIs externes. Lorsque l'on teste des actions, on a souvent besoin de faire du mocking — par exemple, on peut abstraire l'appel API dans un service et mocker ce service dans nos tests. Afin de mocker facilement les dรฉpendances, on peut utiliser Webpack et [inject-loader](https://github.com/plasticine/inject-loader) pour regrouper nos fichiers de test.
52+
Les actions sont un peu plus compliquรฉes car elles peuvent faire appel ร  des APIs externes. Lorsque l'on teste des actions, on a souvent besoin de faire du mocking — par exemple, on peut abstraire l'appel API dans un service et mocker ce service dans nos tests. Afin de mocker facilement les dรฉpendances, on peut utiliser webpack et [inject-loader](https://github.com/plasticine/inject-loader) pour regrouper nos fichiers de test.
5353

5454
Exemple de test d'une action asynchrone :
5555

@@ -177,7 +177,7 @@ describe('getters', () => {
177177

178178
### Lancer les tests
179179

180-
Si vos mutations et actions sont รฉcrites comme il se doit, les tests ne devraient pas avoir de dรฉpendance directe sur les APIs navigateur aprรจs un mocking prรฉalable. Cela signifie que vous pouvez simplement regrouper les tests avec Webpack et les lancer directement dans Node. De faรงon alternative, vous pouvez utiliser `mocha-loader` ou Karma + `karma-webpack` afin d'effectuer les tests dans des vrais navigateurs.
180+
Si vos mutations et actions sont รฉcrites comme il se doit, les tests ne devraient pas avoir de dรฉpendance directe sur les APIs navigateur aprรจs un mocking prรฉalable. Cela signifie que vous pouvez simplement regrouper les tests avec webpack et les lancer directement dans Node. De faรงon alternative, vous pouvez utiliser `mocha-loader` ou Karma + `karma-webpack` afin d'effectuer les tests dans des vrais navigateurs.
181181

182182
#### Lancer dans Node
183183

โ€Ždocs/ja/hot-reload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ใƒ›ใƒƒใƒˆใƒชใƒญใƒผใƒ‡ใ‚ฃใƒณใ‚ฐ
22

3-
Vuex ใฏ Webpack ใฎ [Hot Module Replacement API](https://webpack.github.io/docs/hot-module-replacement.html) ใ‚’ไฝฟ็”จใ™ใ‚‹ใ“ใจใงใ€ใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใฎ้–‹็™บใ‚’่กŒใฃใฆใ„ใ‚‹้–“ใฎใƒŸใƒฅใƒผใƒ†ใƒผใ‚ทใƒงใƒณใ€ใƒขใ‚ธใƒฅใƒผใƒซใ€ใ‚ขใ‚ฏใ‚ทใƒงใƒณใ€ใ‚ฒใƒƒใ‚ฟใƒผใฎใƒ›ใƒƒใƒˆใƒชใƒญใƒผใƒ‡ใ‚ฃใƒณใ‚ฐใ‚’ใ‚ตใƒใƒผใƒˆใ—ใพใ™ใ€‚Browserify ใงใฏ [browserify-hmr](https://github.com/AgentME/browserify-hmr/) ใƒ—ใƒฉใ‚ฐใ‚คใƒณใ‚’ไฝฟ็”จใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚
3+
Vuex ใฏ webpack ใฎ [Hot Module Replacement API](https://webpack.github.io/docs/hot-module-replacement.html) ใ‚’ไฝฟ็”จใ™ใ‚‹ใ“ใจใงใ€ใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใฎ้–‹็™บใ‚’่กŒใฃใฆใ„ใ‚‹้–“ใฎใƒŸใƒฅใƒผใƒ†ใƒผใ‚ทใƒงใƒณใ€ใƒขใ‚ธใƒฅใƒผใƒซใ€ใ‚ขใ‚ฏใ‚ทใƒงใƒณใ€ใ‚ฒใƒƒใ‚ฟใƒผใฎใƒ›ใƒƒใƒˆใƒชใƒญใƒผใƒ‡ใ‚ฃใƒณใ‚ฐใ‚’ใ‚ตใƒใƒผใƒˆใ—ใพใ™ใ€‚Browserify ใงใฏ [browserify-hmr](https://github.com/AgentME/browserify-hmr/) ใƒ—ใƒฉใ‚ฐใ‚คใƒณใ‚’ไฝฟ็”จใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚
44

55
ใƒŸใƒฅใƒผใƒ†ใƒผใ‚ทใƒงใƒณใจใƒขใ‚ธใƒฅใƒผใƒซใฎใƒ›ใƒƒใƒˆใƒชใƒญใƒผใƒ‡ใ‚ฃใƒณใ‚ฐใฎใŸใ‚ใซใ€`store.hotUpdate()` API ใƒกใ‚ฝใƒƒใƒ‰ใ‚’ๅˆฉ็”จใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™:
66

โ€Ždocs/ja/plugins.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const myPluginWithSnapshot = store => {
7070
}
7171
```
7272

73-
**็Šถๆ…‹ใฎใ‚นใƒŠใƒƒใƒ—ใ‚ทใƒงใƒƒใƒˆใ‚’ๆ’ฎใ‚‹ใƒ—ใƒฉใ‚ฐใ‚คใƒณใฏใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใฎ้–‹็™บใฎ้–“ใ ใ‘ไฝฟใ‚ใ‚Œใ‚‹ในใใงใ™ใ€‚** Webpack ใ‚„ Browserify ใ‚’ไฝฟใฃใฆใ„ใ‚Œใฐใ€ใƒ“ใƒซใƒ‰ใƒ„ใƒผใƒซใซใใ‚Œใ‚’ๅ‡ฆ็†ใ•ใ›ใ‚‹ใ“ใจใŒใงใใพใ™:
73+
**็Šถๆ…‹ใฎใ‚นใƒŠใƒƒใƒ—ใ‚ทใƒงใƒƒใƒˆใ‚’ๆ’ฎใ‚‹ใƒ—ใƒฉใ‚ฐใ‚คใƒณใฏใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใฎ้–‹็™บใฎ้–“ใ ใ‘ไฝฟใ‚ใ‚Œใ‚‹ในใใงใ™ใ€‚** webpack ใ‚„ Browserify ใ‚’ไฝฟใฃใฆใ„ใ‚Œใฐใ€ใƒ“ใƒซใƒ‰ใƒ„ใƒผใƒซใซใใ‚Œใ‚’ๅ‡ฆ็†ใ•ใ›ใ‚‹ใ“ใจใŒใงใใพใ™:
7474

7575
``` js
7676
const store = new Vuex.Store({
@@ -81,7 +81,7 @@ const store = new Vuex.Store({
8181
})
8282
```
8383

84-
ไธŠใฎใ‚ˆใ†ใซ่จ˜่ฟฐใ™ใ‚Œใฐใ€ใƒ—ใƒฉใ‚ฐใ‚คใƒณใฏใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใงๅˆฉ็”จใ•ใ‚Œใ‚‹ใ“ใจใซใชใ‚Šใพใ™ใ€‚ๆœฌ็•ช็’ฐๅขƒ( production ) ใงใฏใ€ `process.env.NODE_ENV !== 'production'` ใ‚’ `false` ใซ็ฝฎใๆ›ใˆใ‚‹ใŸใ‚ใซใ€ Webpack ใงใฏ[DefinePlugin](https://webpack.github.io/docs/list-of-plugins.html#defineplugin) ใ€ Browserify ใงใฏ[envify](https://github.com/hughsk/envify) ใŒๅฟ…่ฆใซใชใ‚Šใพใ™ใ€‚
84+
ไธŠใฎใ‚ˆใ†ใซ่จ˜่ฟฐใ™ใ‚Œใฐใ€ใƒ—ใƒฉใ‚ฐใ‚คใƒณใฏใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใงๅˆฉ็”จใ•ใ‚Œใ‚‹ใ“ใจใซใชใ‚Šใพใ™ใ€‚ๆœฌ็•ช็’ฐๅขƒ( production ) ใงใฏใ€ `process.env.NODE_ENV !== 'production'` ใ‚’ `false` ใซ็ฝฎใๆ›ใˆใ‚‹ใŸใ‚ใซใ€ webpack ใงใฏ[DefinePlugin](https://webpack.github.io/docs/list-of-plugins.html#defineplugin) ใ€ Browserify ใงใฏ[envify](https://github.com/hughsk/envify) ใŒๅฟ…่ฆใซใชใ‚Šใพใ™ใ€‚
8585

8686
### ใƒ“ใƒซใƒˆใ‚คใƒณใƒญใ‚ฌใƒผใƒ—ใƒฉใ‚ฐใ‚คใƒณ
8787

โ€Ždocs/ja/testing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ describe('mutations', () => {
4949

5050
### ใ‚ขใ‚ฏใ‚ทใƒงใƒณใฎใƒ†ใ‚นใƒˆ
5151

52-
ใ‚ขใ‚ฏใ‚ทใƒงใƒณใฏๅค–้ƒจใฎ API ใ‚’ๅ‘ผใณๅ‡บใ™ๅฏ่ƒฝๆ€งใŒใ‚ใ‚‹ใŸใ‚ใ€ใƒŸใƒฅใƒผใƒ†ใƒผใ‚ทใƒงใƒณใฎใƒ†ใ‚นใƒˆใ‚ˆใ‚Šใ‚‚ๅฐ‘ใ—ๆณจๆ„ใŒๅฟ…่ฆใงใ™ใ€‚ใ‚ขใ‚ฏใ‚ทใƒงใƒณใ‚’ใƒ†ใ‚นใƒˆใ™ใ‚‹ใจใใ€้€šๅธธใ€ใ„ใใคใ‹ใฎๆฎต้šŽใงใƒขใƒƒใ‚ฏใ‚’ไฝœใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚ไพ‹ใˆใฐ API ๅ‘ผใณๅ‡บใ—ใ‚’ใ‚ตใƒผใƒ“ใ‚นใจใ—ใฆๆŠฝ่ฑกๅŒ–ใ—ใ€ใใ—ใฆใƒ†ใ‚นใƒˆใฎๅ†…้ƒจใงใฏใใฎใ‚ตใƒผใƒ“ใ‚นใ‚’ใƒขใƒƒใ‚ฏใซใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚็ฐกๅ˜ใซไพๅญ˜้–ขไฟ‚ใ‚’ใƒขใƒƒใ‚ฏๅŒ–ใ™ใ‚‹ใŸใ‚ใซใ€Webpack ใจ [inject-loader](https://github.com/plasticine/inject-loader) ใ‚’ไฝฟใฃใฆใƒ†ใ‚นใƒˆใƒ•ใ‚กใ‚คใƒซใ‚’ใƒใƒณใƒ‰ใƒซใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚
52+
ใ‚ขใ‚ฏใ‚ทใƒงใƒณใฏๅค–้ƒจใฎ API ใ‚’ๅ‘ผใณๅ‡บใ™ๅฏ่ƒฝๆ€งใŒใ‚ใ‚‹ใŸใ‚ใ€ใƒŸใƒฅใƒผใƒ†ใƒผใ‚ทใƒงใƒณใฎใƒ†ใ‚นใƒˆใ‚ˆใ‚Šใ‚‚ๅฐ‘ใ—ๆณจๆ„ใŒๅฟ…่ฆใงใ™ใ€‚ใ‚ขใ‚ฏใ‚ทใƒงใƒณใ‚’ใƒ†ใ‚นใƒˆใ™ใ‚‹ใจใใ€้€šๅธธใ€ใ„ใใคใ‹ใฎๆฎต้šŽใงใƒขใƒƒใ‚ฏใ‚’ไฝœใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚ไพ‹ใˆใฐ API ๅ‘ผใณๅ‡บใ—ใ‚’ใ‚ตใƒผใƒ“ใ‚นใจใ—ใฆๆŠฝ่ฑกๅŒ–ใ—ใ€ใใ—ใฆใƒ†ใ‚นใƒˆใฎๅ†…้ƒจใงใฏใใฎใ‚ตใƒผใƒ“ใ‚นใ‚’ใƒขใƒƒใ‚ฏใซใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚็ฐกๅ˜ใซไพๅญ˜้–ขไฟ‚ใ‚’ใƒขใƒƒใ‚ฏๅŒ–ใ™ใ‚‹ใŸใ‚ใซใ€webpack ใจ [inject-loader](https://github.com/plasticine/inject-loader) ใ‚’ไฝฟใฃใฆใƒ†ใ‚นใƒˆใƒ•ใ‚กใ‚คใƒซใ‚’ใƒใƒณใƒ‰ใƒซใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚
5353

5454
้žๅŒๆœŸใชใ‚ขใ‚ฏใ‚ทใƒงใƒณใฎใƒ†ใ‚นใƒˆใฎไพ‹:
5555

@@ -176,7 +176,7 @@ describe('getters', () => {
176176

177177
### ใƒ†ใ‚นใƒˆใฎๅฎŸ่กŒ
178178

179-
ใƒŸใƒฅใƒผใƒ†ใƒผใ‚ทใƒงใƒณใ‚„ใ‚ขใ‚ฏใ‚ทใƒงใƒณใŒ้ฉๅˆ‡ใซๆ›ธใ‹ใ‚Œใฆใ„ใ‚‹ๅ ดๅˆใฏใ€้ฉๅˆ‡ใซใƒขใƒƒใ‚ฏๅŒ–ใ•ใ‚ŒใŸๅพŒใ€ใƒ†ใ‚นใƒˆใ‚ณใƒผใƒ‰ใฏใƒ–ใƒฉใ‚ฆใ‚ถใฎ API ใซ็›ดๆŽฅไพๅญ˜้–ขไฟ‚ใ‚’ๆŒใคใ“ใจใฏใชใ„ใงใ—ใ‚‡ใ†ใ€‚ใ—ใŸใŒใฃใฆใ€ๅ˜็ด”ใซ Webpack ใงใƒ†ใ‚นใƒˆใ‚’ใƒใƒณใƒ‰ใƒซใงใใ€ใใ‚Œใ‚’็›ดๆŽฅ Node ใงๅฎŸ่กŒใงใใพใ™ใ€‚ๅˆฅใฎๆ–นๆณ•ใจใ—ใฆใ€ๆœฌๅฝ“ใฎใƒ–ใƒฉใ‚ฆใ‚ถใงใƒ†ใ‚นใƒˆใ‚’ๅฎŸ่กŒใ™ใ‚‹ใŸใ‚ใซใฏ `mocha-loader` ใพใŸใฏ Karma + `karma-webpack` ใ‚’ไฝฟ็”จใงใใพใ™ใ€‚
179+
ใƒŸใƒฅใƒผใƒ†ใƒผใ‚ทใƒงใƒณใ‚„ใ‚ขใ‚ฏใ‚ทใƒงใƒณใŒ้ฉๅˆ‡ใซๆ›ธใ‹ใ‚Œใฆใ„ใ‚‹ๅ ดๅˆใฏใ€้ฉๅˆ‡ใซใƒขใƒƒใ‚ฏๅŒ–ใ•ใ‚ŒใŸๅพŒใ€ใƒ†ใ‚นใƒˆใ‚ณใƒผใƒ‰ใฏใƒ–ใƒฉใ‚ฆใ‚ถใฎ API ใซ็›ดๆŽฅไพๅญ˜้–ขไฟ‚ใ‚’ๆŒใคใ“ใจใฏใชใ„ใงใ—ใ‚‡ใ†ใ€‚ใ—ใŸใŒใฃใฆใ€ๅ˜็ด”ใซ webpack ใงใƒ†ใ‚นใƒˆใ‚’ใƒใƒณใƒ‰ใƒซใงใใ€ใใ‚Œใ‚’็›ดๆŽฅ Node ใงๅฎŸ่กŒใงใใพใ™ใ€‚ๅˆฅใฎๆ–นๆณ•ใจใ—ใฆใ€ๆœฌๅฝ“ใฎใƒ–ใƒฉใ‚ฆใ‚ถใงใƒ†ใ‚นใƒˆใ‚’ๅฎŸ่กŒใ™ใ‚‹ใŸใ‚ใซใฏ `mocha-loader` ใพใŸใฏ Karma + `karma-webpack` ใ‚’ไฝฟ็”จใงใใพใ™ใ€‚
180180

181181
#### Node ใงใฎๅฎŸ่กŒ
182182

@@ -212,7 +212,7 @@ mocha test-bundle.js
212212
#### ใƒ–ใƒฉใ‚ฆใ‚ถใงใฎๅฎŸ่กŒ
213213

214214
1. `mocha-loader` ใ‚’ใ‚คใƒณใ‚นใƒˆใƒผใƒซใ™ใ‚‹
215-
2. ไธŠ่จ˜ Webpack ่จญๅฎšใ‹ใ‚‰ `entry` ใ‚’ `'mocha!babel!./test.js'` ใซๅค‰ๆ›ดใ™ใ‚‹
215+
2. ไธŠ่จ˜ webpack ่จญๅฎšใ‹ใ‚‰ `entry` ใ‚’ `'mocha!babel!./test.js'` ใซๅค‰ๆ›ดใ™ใ‚‹
216216
3. ่จญๅฎšใ‚’ไฝฟ็”จใ—ใฆ `webpack-dev-server` ใ‚’้–‹ๅง‹ใ™ใ‚‹
217217
4. ใƒ–ใƒฉใ‚ฆใ‚ถใง `localhost:8080/webpack-dev-server/test-bundle` ใ‚’้–‹ใ
218218

โ€Ždocs/kr/hot-reload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ํ•ซ ๋ฆฌ๋กœ๋”ฉ
22

3-
Vuex๋Š” Webpack์˜ [ํ•ซ ๋ชจ๋“ˆ ๋ณ€๊ฒฝ API](https://webpack.github.io/docs/hot-module-replacement.html)๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ฐœ๋ฐœ ์ค‘์— ํ•ซ ๋ฆฌ๋กœ๋“œ ๋ณ€์ด, ๋ชจ๋“ˆ, ์•ก์…˜ ๋ฐ getter๋ฅผ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. [browserify-hmr](https://github.com/AgentME/browserify-hmr/) ํ”Œ๋Ÿฌ๊ทธ์ธ์œผ๋กœ Browserify์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.
3+
Vuex๋Š” webpack์˜ [ํ•ซ ๋ชจ๋“ˆ ๋ณ€๊ฒฝ API](https://webpack.github.io/docs/hot-module-replacement.html)๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ฐœ๋ฐœ ์ค‘์— ํ•ซ ๋ฆฌ๋กœ๋“œ ๋ณ€์ด, ๋ชจ๋“ˆ, ์•ก์…˜ ๋ฐ getter๋ฅผ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. [browserify-hmr](https://github.com/AgentME/browserify-hmr/) ํ”Œ๋Ÿฌ๊ทธ์ธ์œผ๋กœ Browserify์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.
44

55
๋ณ€์ด์™€ ๋ชจ๋“ˆ์˜ ๊ฒฝ์šฐ, `store.hotUpdate()` API ๋ฉ”์†Œ๋“œ๋ฅผ ์‚ฌ์šฉํ•  ํ•„์š”๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.
66

โ€Ždocs/kr/plugins.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const myPluginWithSnapshot = store => {
7070
}
7171
```
7272

73-
**์ƒํƒœ ์Šค๋ƒ… ์ƒท์„ ์‚ฌ์šฉํ•˜๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ์€ ๊ฐœ๋ฐœ ์ค‘์— ๋งŒ ์‚ฌ์šฉํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.** Webpack ๋˜๋Š” Browserify๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ ๋นŒ๋“œ ๋„๊ตฌ๊ฐ€ ์ด๋ฅผ ์ฒ˜๋ฆฌ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
73+
**์ƒํƒœ ์Šค๋ƒ… ์ƒท์„ ์‚ฌ์šฉํ•˜๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ์€ ๊ฐœ๋ฐœ ์ค‘์— ๋งŒ ์‚ฌ์šฉํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.** webpack ๋˜๋Š” Browserify๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ ๋นŒ๋“œ ๋„๊ตฌ๊ฐ€ ์ด๋ฅผ ์ฒ˜๋ฆฌ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
7474

7575
``` js
7676
const store = new Vuex.Store({
@@ -81,7 +81,7 @@ const store = new Vuex.Store({
8181
})
8282
```
8383

84-
ํ”Œ๋Ÿฌ๊ทธ์ธ์€ ๊ธฐ๋ณธ์ ์œผ๋กœ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ๋ฐฐํฌ๋ฅผ ์œ„ํ•ด์„œ๋Š” Webpack์˜ [DefinePlugin](https://webpack.github.io/docs/list-of-plugins.html#defineplugin) ๋˜๋Š” [envify](https://github.com/hughsk/envify)๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. Browserify๊ฐ€ `process.env.NODE_ENV !== 'production'`์˜ ๊ฐ’์„ ์ตœ์ข… ๋นŒ๋“œ๋ฅผ ์œ„ํ•ด `false`๋กœ ๋ณ€ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
84+
ํ”Œ๋Ÿฌ๊ทธ์ธ์€ ๊ธฐ๋ณธ์ ์œผ๋กœ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ๋ฐฐํฌ๋ฅผ ์œ„ํ•ด์„œ๋Š” webpack์˜ [DefinePlugin](https://webpack.github.io/docs/list-of-plugins.html#defineplugin) ๋˜๋Š” [envify](https://github.com/hughsk/envify)๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. Browserify๊ฐ€ `process.env.NODE_ENV !== 'production'`์˜ ๊ฐ’์„ ์ตœ์ข… ๋นŒ๋“œ๋ฅผ ์œ„ํ•ด `false`๋กœ ๋ณ€ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
8585

8686

8787
### ๋‚ด์žฅ ๋กœ๊ฑฐ ํ”Œ๋Ÿฌ๊ทธ์ธ

0 commit comments

Comments
ย (0)