@infomaker/imid-gui
Version:
Utility lib to simplify implementation of IMID related views, such aas 'sign in', 'Unauthorized', 'Session expired' etc.
81 lines (78 loc) • 2.53 kB
JavaScript
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = [
{
name: 'react',
mode: 'production',
entry: {
loginexpired: './client/src/scenes/LoginExpiredScene/LoginExpired.js',
unitswitcher: './client/src/scenes/UnitSwitcherScene/UnitSwitcher.js',
unauthorized: './client/src/scenes/UnauthorizedScene/Unauthorized.js'
},
resolve: {
extensions: ['.js', '.jsx'],
alias: {
"@": path.resolve(__dirname, "client/src/"),
components: path.resolve(__dirname, "client/src/components/"),
scenes: path.resolve(__dirname, "client/src/scenes/"),
}
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader"
}
},
{
test: /\.(png|jpg|gif|svg)$/,
use: [
{
loader: 'url-loader',
options: {}
}
]
}
]
},
plugins: [
new HtmlWebpackPlugin({
inject: false,
cache: false,
filename: "loginexpired.html",
chunks: ['loginexpired'],
template: path.resolve(__dirname, 'client', 'public', 'index.html')
}),
new HtmlWebpackPlugin({
inject: false,
cache: false,
filename: "unauthorized.html",
chunks: ['unauthorized'],
template: path.resolve(__dirname, 'client', 'public', 'index.html')
}),
new HtmlWebpackPlugin({
inject: false,
cache: false,
filename: "unitswitcher.html",
chunks: ['unitswitcher'],
template: path.resolve(__dirname, 'client', 'public', 'index.html')
})
]
},
{
name: 'node',
mode: 'production',
entry: './server/index',
target: 'node',
output: {
libraryTarget: 'commonjs2',
path: path.resolve(__dirname, 'dist'),
filename: 'index.js'
},
node: {
__dirname: false
}
}
]