File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
packages/graphpack/config Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,9 @@ const nodeExternals = require('webpack-node-externals');
66const IS_DEV = process . env . NODE_ENV !== 'production' ;
77
88module . exports = {
9+ devtool : 'sourcemap' ,
910 entry : {
10- // We take care of setting up the server under . /server.js
11+ // We take care of setting up entry file under lib /server.js
1112 index : [ 'graphpack' ] ,
1213 } ,
1314 // When bundling with Webpack for the backend you usually don't want to bundle
@@ -40,21 +41,28 @@ module.exports = {
4041 } ,
4142 ] ,
4243 } ,
44+ node : {
45+ __filename : true ,
46+ __dirname : true ,
47+ } ,
4348 optimization : { noEmitOnErrors : true } ,
4449 output : {
4550 filename : '[name].js' ,
4651 libraryTarget : 'commonjs2' ,
4752 path : path . join ( process . cwd ( ) , './build' ) ,
4853 sourceMapFilename : '[name].map' ,
4954 } ,
55+ performance : {
56+ hints : false ,
57+ } ,
5058 plugins : [
5159 new webpack . optimize . LimitChunkCountPlugin ( { maxChunks : 1 } ) ,
5260 new webpack . EnvironmentPlugin ( {
5361 DEBUG : false ,
5462 GRAPHPACK_SRC_DIR : path . resolve ( process . cwd ( ) , 'src' ) ,
5563 NODE_ENV : 'development' ,
5664 } ) ,
57- new FriendlyErrorsWebpackPlugin ( ) ,
65+ new FriendlyErrorsWebpackPlugin ( { clearConsole : IS_DEV } ) ,
5866 ] ,
5967 stats : 'minimal' ,
6068 target : 'node' ,
You can’t perform that action at this time.
0 commit comments