2019-11-27 18:37:38 +00:00
|
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
2018-07-29 11:50:10 +00:00
|
|
|
|
|
|
|
module.exports = {
|
2018-08-10 12:12:18 +00:00
|
|
|
staticPath: './static',
|
|
|
|
distPath: './dist',
|
|
|
|
dev: {
|
|
|
|
entry: {
|
|
|
|
app: './src/main.js'
|
2018-07-29 11:50:10 +00:00
|
|
|
},
|
2018-10-15 12:05:54 +00:00
|
|
|
entryHtml: './src/index.html',
|
|
|
|
srcDir: './src',
|
2018-08-10 12:12:18 +00:00
|
|
|
outputDir: './dist',
|
|
|
|
assetsPublicPath: '/',
|
2019-11-27 18:37:38 +00:00
|
|
|
devServerPort: 8080,
|
2018-08-10 12:12:18 +00:00
|
|
|
env: {
|
2019-11-27 18:37:38 +00:00
|
|
|
PORT: process.env.PORT || 8080
|
2018-08-10 12:12:18 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
node: {
|
|
|
|
paths: {
|
|
|
|
main: 'server/index.js'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
electron: {
|
2018-10-20 12:32:01 +00:00
|
|
|
entry: {
|
2019-11-27 18:37:38 +00:00
|
|
|
app: './src/main-electron.js',
|
|
|
|
print: './src/print.js'
|
2018-10-20 12:32:01 +00:00
|
|
|
},
|
2018-08-10 12:12:18 +00:00
|
|
|
paths: {
|
|
|
|
mainDev: 'src-electron/main.dev.js',
|
|
|
|
main: 'src-electron/main.js',
|
|
|
|
renderer: 'src/electron.js'
|
2018-07-29 11:50:10 +00:00
|
|
|
}
|
2019-11-27 18:37:38 +00:00
|
|
|
},
|
|
|
|
configureWebpack(config) {
|
|
|
|
config.plugins.push(
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
chunks: ['print'],
|
|
|
|
filename: 'static/print.html',
|
|
|
|
template: 'src/print.html'
|
|
|
|
})
|
|
|
|
);
|
2018-08-10 12:12:18 +00:00
|
|
|
}
|
2019-11-27 18:37:38 +00:00
|
|
|
};
|