mirror of
https://github.com/aleleba/create-react-ssr.git
synced 2025-06-20 04:48:30 -06:00
PR-492498: changing some webpack configuration and updating packages.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
||||
import webpackNodeExternals from 'webpack-node-externals';
|
||||
import WebpackShellPluginNext from 'webpack-shell-plugin-next';
|
||||
import path from 'path';
|
||||
import { Configuration } from 'webpack';
|
||||
const ROOT_DIR = path.resolve(__dirname);
|
||||
@ -57,7 +58,7 @@ const config: Configuration = {
|
||||
test: fontsAndImagesExtensions,
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: '/assets/media/[name].[ext]',
|
||||
name: '/assets/[name].[ext]',
|
||||
emitFile: false,
|
||||
},
|
||||
},
|
||||
@ -82,6 +83,13 @@ const config: Configuration = {
|
||||
new MiniCssExtractPlugin({
|
||||
filename: 'assets/app.css',
|
||||
}),
|
||||
new WebpackShellPluginNext({
|
||||
onBuildEnd: {
|
||||
scripts: ['node build/server.js'],
|
||||
blocking: false,
|
||||
parallel: true
|
||||
}
|
||||
})
|
||||
],
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user