Added web setup entry point
This commit is contained in:
committed by
Eugene Bujak
parent
f21aebd1cf
commit
71259c5f19
13
client/webpack.common.js
vendored
13
client/webpack.common.js
vendored
@@ -8,7 +8,9 @@ const CleanWebpackPlugin = require('clean-webpack-plugin');
|
||||
|
||||
const RESOURCES_PATH = path.resolve(__dirname);
|
||||
const ENTRY_REACT = path.resolve(RESOURCES_PATH, 'src/index.js');
|
||||
const ENTRY_INSTALL = path.resolve(RESOURCES_PATH, 'src/install/index.js');
|
||||
const HTML_PATH = path.resolve(RESOURCES_PATH, 'public/index.html');
|
||||
const HTML_INSTALL_PATH = path.resolve(RESOURCES_PATH, 'public/install.html');
|
||||
|
||||
const PUBLIC_PATH = path.resolve(__dirname, '../build/static');
|
||||
|
||||
@@ -16,7 +18,8 @@ const config = {
|
||||
target: 'web',
|
||||
context: RESOURCES_PATH,
|
||||
entry: {
|
||||
bundle: ENTRY_REACT,
|
||||
main: ENTRY_REACT,
|
||||
install: ENTRY_INSTALL,
|
||||
},
|
||||
output: {
|
||||
path: PUBLIC_PATH,
|
||||
@@ -101,8 +104,16 @@ const config = {
|
||||
new HtmlWebpackPlugin({
|
||||
inject: true,
|
||||
cache: false,
|
||||
chunks: ['main'],
|
||||
template: HTML_PATH,
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
inject: true,
|
||||
cache: false,
|
||||
chunks: ['install'],
|
||||
filename: 'install.html',
|
||||
template: HTML_INSTALL_PATH,
|
||||
}),
|
||||
new ExtractTextPlugin({
|
||||
filename: '[name].[contenthash].css',
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user