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');
11
11
module . exports = {
12
12
setup ( config ) {
13
13
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
+
14
27
const result = Object . assign ( defaults , config ) ;
15
28
const before = function before ( app ) {
16
29
app . get ( '/.assets/*' , ( req , res ) => {
You can’t perform that action at this time.
0 commit comments