Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2155a2e

Browse filesBrowse files
gbezyukkazupon
authored andcommitted
[JUST MERGE ME] Russian translation update (vuejs#791)
* Russian translation update * options.md допереведено предложение
1 parent 8695e9c commit 2155a2e
Copy full SHA for 2155a2e

File tree

Expand file treeCollapse file tree

3 files changed

+100
-6
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+100
-6
lines changed

‎docs/ru/configurations/extract-css.md

Copy file name to clipboardExpand all lines: docs/ru/configurations/extract-css.md
+37-4Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,46 @@
11
# Извлечение CSS в отдельный файл
22

3-
Пример конфигурации для извлечения CSS из всех компонентов Vue в отдельный CSS-файл:
4-
5-
### Webpack 2.x
6-
73
``` bash
84
npm install extract-text-webpack-plugin --save-dev
95
```
106

7+
## Простой путь
8+
9+
> требуется vue-loader@^12.0.0 и webpack@^2.0.0
10+
11+
``` js
12+
// webpack.config.js
13+
var ExtractTextPlugin = require("extract-text-webpack-plugin")
14+
15+
module.exports = {
16+
// другие настройки...
17+
module: {
18+
rules: [
19+
{
20+
test: /\.vue$/,
21+
loader: 'vue-loader',
22+
options: {
23+
extractCSS: true
24+
}
25+
}
26+
]
27+
},
28+
plugins: [
29+
new ExtractTextPlugin("style.css")
30+
]
31+
}
32+
```
33+
34+
Указанный выше пример будет автоматически обрабатывать извлечение `<style>` изнутри `*.vue` файлов и работать с большинством пре-процессоров из коробки.
35+
36+
Обратите внимание, что это будет извлекать только из `*.vue` файлов, для CSS импортрируемого в JavaScript по-прежнему будет требоваться отдельная настройка.
37+
38+
## Конфигурация вручную
39+
40+
Пример конфигурации для извлечения CSS из всех компонентов Vue в отдельный CSS-файл:
41+
42+
### Webpack 2.x
43+
1144
``` js
1245
// webpack.config.js
1346
var ExtractTextPlugin = require("extract-text-webpack-plugin")

‎docs/ru/features/scoped-css.md

Copy file name to clipboardExpand all lines: docs/ru/features/scoped-css.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818

1919
``` html
2020
<style>
21-
.example[_v-f3f3eg9] {
21+
.example[data-v-f3f3eg9] {
2222
color: red;
2323
}
2424
</style>
2525

2626
<template>
27-
<div class="example" _v-f3f3eg9>hi</div>
27+
<div class="example" data-v-f3f3eg9>hi</div>
2828
</template>
2929
```
3030

‎docs/ru/options.md

Copy file name to clipboardExpand all lines: docs/ru/options.md
+61Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,64 @@ module.exports = {
185185
]
186186
}
187187
```
188+
189+
### extractCSS
190+
191+
> Добавлено в версии 12.0.0
192+
193+
Автоматически извлекает CSS с помощью `extract-text-webpack-plugin`. Работает для большинства пре-процессоров из коробки и минифицирует при сборке в production.
194+
195+
Передаваемое значение может быть `true`, или экземпляром плагина (так что вы можете использовать несколько экземпляров extract plugin для разных извлекаемых файлов).
196+
197+
Это должно использоваться только в production, чтобы горячая перезагрузка модулей работала в процессе разработки.
198+
199+
Например:
200+
201+
``` js
202+
// webpack.config.js
203+
var ExtractTextPlugin = require("extract-text-webpack-plugin")
204+
205+
module.exports = {
206+
// другие настройки...
207+
module: {
208+
rules: [
209+
{
210+
test: /\.vue$/,
211+
loader: 'vue-loader',
212+
options: {
213+
extractCSS: true
214+
}
215+
}
216+
]
217+
},
218+
plugins: [
219+
new ExtractTextPlugin("style.css")
220+
]
221+
}
222+
```
223+
224+
Или можно передать экземпляр плагина:
225+
226+
``` js
227+
// webpack.config.js
228+
var ExtractTextPlugin = require("extract-text-webpack-plugin")
229+
var plugin = new ExtractTextPlugin("style.css")
230+
231+
module.exports = {
232+
// другие настройки...
233+
module: {
234+
rules: [
235+
{
236+
test: /\.vue$/,
237+
loader: 'vue-loader',
238+
options: {
239+
extractCSS: plugin
240+
}
241+
}
242+
]
243+
},
244+
plugins: [
245+
plugin
246+
]
247+
}
248+
```

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.