Files
fb-admin/src/backend/webpack.prod.js
T
2019-08-28 01:36:54 +02:00

82 lines
1.5 KiB
JavaScript

const path = require('path');
module.exports = [{
mode: 'production',
target: "web",
entry: path.resolve(__dirname, '../../lib/FrontblockLib.js'),
output: {
path: path.resolve(__dirname, '../../dist'),
filename: 'FrontblockLib.js',
}
},{
mode: 'production',
target: "node",
node: {
global: true,
process: true,
__filename: false,
__dirname: false,
Buffer: true,
},
resolve: {
// Add `.ts` and `.tsx` as a resolvable extension.
extensions: [".ts", ".tsx", ".js"]
},
module: {
rules: [
{ test: /\.ts?$/, loader: "ts-loader" }
]
},
externals:{
knex: "../plugins/node_modules/knex"
},
optimization: {
minimize: false
},
entry: path.resolve(__dirname, 'Installer.ts'),
output: {
path: path.resolve(__dirname, '../../dist'),
filename: 'Installer.js',
libraryTarget: 'commonjs',
}
},{
mode: 'production',
target: "node",
node: {
global: true,
process: true,
__filename: false,
__dirname: false,
Buffer: true,
},
resolve: {
// Add `.ts` and `.tsx` as a resolvable extension.
extensions: [".ts", ".tsx", ".js"]
},
module: {
rules: [
{ test: /\.ts?$/, loader: "ts-loader" }
]
},
externals:{
"./Installer": "./Installer"
},
optimization: {
minimize: false
},
entry: path.resolve(__dirname, 'Launcher.ts'),
output: {
path: path.resolve(__dirname, '../../dist'),
filename: 'FrontblockAdmin.js',
libraryTarget: 'commonjs',
}
}]