123456789101112131415161718 |
- const path = require('path');
- const nodeExternals = require('webpack-node-externals');
- const webpack = require('webpack');
- module.exports = {
- target: 'node',
- entry: './server/index',
- output: {
- path: path.resolve(__dirname, '../.next'),
- filename: 'server.bundle.js',
- },
- plugins: [
- new webpack.DefinePlugin({
- 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
- }),
- ],
- externals: [nodeExternals()],
- };
|