File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,19 @@ const webpack = require('webpack');
1111module . exports = {
1212 setup ( config ) {
1313 const defaults = { mode : 'development' , plugins : [ ] , devServer : { } } ;
14+
15+ if ( config . entry ) {
16+ if ( typeof config . entry === 'string' ) {
17+ config . entry = path . resolve ( config . entry ) ;
18+ } else if ( Array . isArray ( config . entry ) ) {
19+ config . entry = config . entry . map ( ( entry ) => path . resolve ( entry ) ) ;
20+ } else if ( typeof config . entry === 'object' ) {
21+ Object . entries ( config . entry ) . forEach ( ( [ key , value ] ) => {
22+ config . entry [ key ] = path . resolve ( value ) ;
23+ } ) ;
24+ }
25+ }
26+
1427 const result = Object . assign ( defaults , config ) ;
1528 const before = function before ( app ) {
1629 app . get ( '/.assets/*' , ( req , res ) => {
You can’t perform that action at this time.
0 commit comments