mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-23 07:42:10 +00:00
39 lines
904 B
JavaScript
39 lines
904 B
JavaScript
const path = require('path');
|
|
|
|
const serverBuild = {
|
|
mode: 'production',
|
|
entry: './src/index.js',
|
|
target: 'node',
|
|
output: {
|
|
path: path.resolve('dist'),
|
|
filename: 'fyipe.js',
|
|
library: 'Fyipe',
|
|
libraryExport: 'default',
|
|
libraryTarget: 'umd',
|
|
globalObject: 'this',
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.js?$/,
|
|
exclude: /(node_modules)/,
|
|
use: {
|
|
loader: 'babel-loader',
|
|
options: {
|
|
presets: ['@babel/preset-env'],
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: ['.js'],
|
|
},
|
|
};
|
|
const webBuild = {
|
|
...serverBuild,
|
|
target: 'web',
|
|
output: { ...serverBuild.output, filename: 'fyipe.min.js' },
|
|
};
|
|
module.exports = [serverBuild, webBuild];
|