@caweb/webpack 1.5.9 → 1.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/webpack.config.js +17 -0
package/package.json
CHANGED
package/webpack.config.js
CHANGED
|
@@ -361,6 +361,15 @@ if( 'serve' === webpackCommand ){
|
|
|
361
361
|
*/
|
|
362
362
|
{
|
|
363
363
|
directory: path.join(appPath, 'node_modules'),
|
|
364
|
+
},
|
|
365
|
+
/**
|
|
366
|
+
* Static files are served from the following files in the following order
|
|
367
|
+
* we don't have to add the build directory since that is the output.path and proxied
|
|
368
|
+
*
|
|
369
|
+
* node_modules - Allows loading files from other npm packages
|
|
370
|
+
*/
|
|
371
|
+
{
|
|
372
|
+
directory: path.join(appPath, 'media'),
|
|
364
373
|
}
|
|
365
374
|
],
|
|
366
375
|
proxy:[
|
|
@@ -383,6 +392,14 @@ if( 'serve' === webpackCommand ){
|
|
|
383
392
|
context: ['/node_modules'],
|
|
384
393
|
target: `${server}://${host}:${port}`,
|
|
385
394
|
pathRewrite: { '^/node_modules': '' },
|
|
395
|
+
},
|
|
396
|
+
/**
|
|
397
|
+
* We proxy the node_modules and src so they serve from the root
|
|
398
|
+
*/
|
|
399
|
+
{
|
|
400
|
+
context: ['/media'],
|
|
401
|
+
target: `${server}://${host}:${port}`,
|
|
402
|
+
pathRewrite: { '^/media': '' },
|
|
386
403
|
}
|
|
387
404
|
]
|
|
388
405
|
}
|