Last active
June 20, 2019 18:07
-
-
Save jeffkamo/f9c8162471374c188bb881ebc8cad14a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
// Near the bottom of the file, before the `module.exports`, | |
// paste in the following code: | |
const requestProcessor = Object.assign( | |
{}, | |
{ | |
entry: './app/request-processor.js', | |
target: 'node', | |
output: { | |
path: path.resolve(process.cwd(), 'build'), | |
filename: 'request-processor.js', | |
// Output a CommonJS module for use in Node | |
libraryTarget: 'commonjs2' | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.js$/, | |
exclude: /node_modules/, | |
use: { | |
loader: 'babel-loader', | |
options: { | |
cacheDirectory: path.join(__dirname, 'tmp') | |
} | |
} | |
} | |
] | |
} | |
} | |
) | |
// Modify the module.export to include the new `requestProcessor` object | |
module.exports = [main, others, ssrServerConfig, requestProcessor] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment