oneuptime/log-js/webpack.config.js

33 lines
741 B
JavaScript
Raw Normal View History

2020-06-08 17:28:12 +00:00
const path = require('path');
2020-06-08 13:05:04 +00:00
module.exports = {
2020-06-09 15:15:12 +00:00
mode: 'production',
entry: './src/logger.js',
2020-10-15 10:03:12 +00:00
target: 'node',
2020-06-09 15:15:12 +00:00
output: {
path: path.resolve('dist'),
filename: 'logger.js',
2020-08-10 15:59:06 +00:00
library: 'FyipeLogger',
2020-10-15 10:03:12 +00:00
libraryExport: 'default',
libraryTarget: 'umd',
2020-10-15 11:06:32 +00:00
globalObject: 'this',
2020-06-09 15:15:12 +00:00
},
module: {
rules: [
{
test: /\.js?$/,
exclude: /(node_modules)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
},
},
},
],
},
resolve: {
extensions: ['.js'],
},
};