File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ var Config = function () {
18
18
entry : { } ,
19
19
entryGroup : { } ,
20
20
output : {
21
+ local : { } ,
21
22
dev : {
22
23
path : "./dev" ,
23
24
filename : "[name][ext]"
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ var Project = function () {
189
189
var output = this . config . getConfig ( ) . output ;
190
190
for ( var key in output ) {
191
191
var op = output [ key ] ;
192
- if ( ! sysPath . isAbsolute ( op . path ) ) {
192
+ if ( op . path && ! sysPath . isAbsolute ( op . path ) ) {
193
193
op . path = sysPath . join ( this . cwd , op . path ) ;
194
194
}
195
195
}
@@ -428,10 +428,11 @@ var Project = function () {
428
428
key : 'getServerCompiler' ,
429
429
value : function getServerCompiler ( handler ) {
430
430
var config = this . config . getConfig ( ) ;
431
- config . output = {
431
+ config . output = extend ( true , {
432
432
path : '/cache' ,
433
433
filename : '[name][ext]'
434
- } ;
434
+ } , config . output . local || { } ) ;
435
+
435
436
this . fixCss ( ) ;
436
437
437
438
if ( handler && typeof handler === 'function' ) {
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ class Config {
10
10
entry : { } ,
11
11
entryGroup : { } ,
12
12
output : {
13
+ local : { } ,
13
14
dev : {
14
15
path : "./dev" ,
15
16
filename : "[name][ext]"
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ class Project {
161
161
let output = this . config . getConfig ( ) . output ;
162
162
for ( let key in output ) {
163
163
var op = output [ key ] ;
164
- if ( ! sysPath . isAbsolute ( op . path ) ) {
164
+ if ( op . path && ! sysPath . isAbsolute ( op . path ) ) {
165
165
op . path = sysPath . join ( this . cwd , op . path ) ;
166
166
}
167
167
}
@@ -395,10 +395,11 @@ class Project {
395
395
396
396
getServerCompiler ( handler ) {
397
397
let config = this . config . getConfig ( ) ;
398
- config . output = {
398
+ config . output = extend ( true , {
399
399
path : '/cache' ,
400
400
filename : '[name][ext]'
401
- } ;
401
+ } , config . output . local || { } ) ;
402
+
402
403
this . fixCss ( ) ;
403
404
404
405
if ( handler && typeof handler === 'function' ) {
You can’t perform that action at this time.
0 commit comments