Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vue-loader
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pi-plusplus
fork-from-github
vue-loader
Commits
db78dbe3
Commit
db78dbe3
authored
Apr 29, 2018
by
Jinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[docs][zh] translated extract-cs.md
parent
150ee0ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
extract-css.md
docs/zh/guide/extract-css.md
+11
-11
No files found.
docs/zh/guide/extract-css.md
View file @
db78dbe3
# CSS
Extraction
# CSS
提取
:::
tip
Only apply CSS extraction for production so that you get CSS hot reload during development.
:::
tip 提示
只有生产环境才会运用 CSS 提取,这有便于你在开发环境下进行热重载。
:::
## webpack 4
...
...
@@ -15,10 +15,10 @@ npm install -D mini-css-extract-plugin
var
MiniCssExtractPlugin
=
require
(
'mini-css-extract-plugin'
)
module
.
exports
=
{
//
other options
...
//
其它选项
...
module
:
{
rules
:
[
// ...
other rules omitted
// ...
其它规则忽略
{
test
:
/
\.
css$/
,
use
:
[
...
...
@@ -31,7 +31,7 @@ module.exports = {
]
},
plugins
:
[
// ...vue-loader
plugin omitted
// ...vue-loader
插件忽略
new
MiniCssExtractPlugin
({
filename
:
style
.
css
})
...
...
@@ -39,7 +39,7 @@ module.exports = {
}
```
Also see
[
mini-css-extract-plugin docs
](
https://github.com/webpack-contrib/mini-css-extract-plugin
)
.
你还可以查阅
[
mini-css-extract-plugin 文档
](
https://github.com/webpack-contrib/mini-css-extract-plugin
)
。
## webpack 3
...
...
@@ -52,10 +52,10 @@ npm install -D extract-text-webpack-plugin
var
ExtractTextPlugin
=
require
(
"extract-text-webpack-plugin"
)
module
.
exports
=
{
//
other options
...
//
其它选项
...
module
:
{
rules
:
[
// ...
other rules omitted
// ...
其它规则忽略
{
test
:
/
\.
css$/
,
loader
:
ExtractTextPlugin
.
extract
({
...
...
@@ -66,10 +66,10 @@ module.exports = {
]
},
plugins
:
[
// ...vue-loader
plugin omitted
// ...vue-loader
插件忽略
new
ExtractTextPlugin
(
"style.css"
)
]
}
```
Also see
[
extract-text-webpack-plugin docs
](
https://github.com/webpack-contrib/extract-text-webpack-plugin
)
.
你也可以查阅
[
extract-text-webpack-plugin 文档
](
https://github.com/webpack-contrib/extract-text-webpack-plugin
)
。
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment