|
|
|
const path = require('path')
|
|
|
|
//__dirname,
|
|
|
|
module.exports = {
|
|
|
|
// entry: "./App.js",
|
|
|
|
entry: {
|
|
|
|
kpdl: './app/Views/kewilayahan/kytp/kpdl.js',
|
|
|
|
monitoring: './app/Views/kewilayahan/monitoring/index.js'
|
|
|
|
// peta: './app/Views/kewilayahan/peta/peta.js'
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: path.resolve('./app/Views/kewilayahan/dist'),
|
|
|
|
filename: '[name].js'
|
|
|
|
},
|
|
|
|
optimization: {
|
|
|
|
minimize: true
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
exclude: /node_modules/,
|
|
|
|
use: {
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
presets: ['@babel/preset-react'],
|
|
|
|
plugins: ['@babel/plugin-proposal-optional-chaining', '@babel/plugin-proposal-nullish-coalescing-operator']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.css$/i,
|
|
|
|
// type: "asset"
|
|
|
|
use: ['style-loader', 'css-loader']
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
mode: 'production'
|
|
|
|
// mode: 'development'
|
|
|
|
// devServer: {
|
|
|
|
// static: {
|
|
|
|
// directory: path.join(__dirname, 'public/kpdl'),
|
|
|
|
// serveIndex: true
|
|
|
|
// },
|
|
|
|
// compress: false,
|
|
|
|
// port: 9000
|
|
|
|
// }
|
|
|
|
}
|