Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sample
Project
Project
Details
Activity
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
周韬
node-sample
Commits
d87f6c60
Commit
d87f6c60
authored
Apr 24, 2017
by
Evan You
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notes about css in deps + extraction
parent
f0f8f67a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
webpack.client.config.js
build/webpack.client.config.js
+5
-0
webpack.server.config.js
build/webpack.server.config.js
+2
-0
No files found.
build/webpack.client.config.js
View file @
d87f6c60
...
...
@@ -24,6 +24,11 @@ const config = merge(base, {
new
webpack
.
optimize
.
CommonsChunkPlugin
({
name
:
'vendor'
,
minChunks
:
function
(
module
)
{
// do not put CSS into the vendor chunk so that it can be extracted
// otherwise extract-text-webpack-plugin will be confused
if
(
/
\.(
css|styl
(
us
)?
|less|sass|scss
)(\?[^
.
]
+
)?
$/
.
test
(
module
.
userRequest
))
{
return
false
}
// this assumes your vendor imports exist in the node_modules directory
return
module
.
context
&&
module
.
context
.
indexOf
(
'node_modules'
)
!==
-
1
;
}
...
...
build/webpack.server.config.js
View file @
d87f6c60
...
...
@@ -16,6 +16,8 @@ module.exports = merge(base, {
'create-api'
:
'./create-api-server.js'
}
},
// note: if a dependency needs to be processed by webpack, e.g. it exports
// CSS or raw *.vue files, do not include it in externals!
externals
:
Object
.
keys
(
require
(
'../package.json'
).
dependencies
),
plugins
:
[
new
webpack
.
DefinePlugin
({
...
...
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