2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 11:29:03 +00:00
books/frappe.conf.js
Faris Ansari 69cb2447d8 feat: Print
- PrintPreview
- print.html bundle for print
- Download PDF
2019-11-28 00:07:38 +05:30

45 lines
884 B
JavaScript

const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
staticPath: './static',
distPath: './dist',
dev: {
entry: {
app: './src/main.js'
},
entryHtml: './src/index.html',
srcDir: './src',
outputDir: './dist',
assetsPublicPath: '/',
devServerPort: 8080,
env: {
PORT: process.env.PORT || 8080
}
},
node: {
paths: {
main: 'server/index.js'
}
},
electron: {
entry: {
app: './src/main-electron.js',
print: './src/print.js'
},
paths: {
mainDev: 'src-electron/main.dev.js',
main: 'src-electron/main.js',
renderer: 'src/electron.js'
}
},
configureWebpack(config) {
config.plugins.push(
new HtmlWebpackPlugin({
chunks: ['print'],
filename: 'static/print.html',
template: 'src/print.html'
})
);
}
};