logseq/libs/webpack.config.js

31 lines
676 B
JavaScript
Raw Normal View History

2021-05-07 08:54:14 +00:00
const path = require('path')
const webpack = require('webpack')
2021-05-07 08:54:14 +00:00
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
module.exports = {
entry: './src/LSPlugin.user.ts',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
plugins: [
new webpack.ProvidePlugin({
process: 'process/browser',
}),
2021-05-07 08:54:14 +00:00
// new BundleAnalyzerPlugin()
],
output: {
library: 'LSPluginEntry',
libraryTarget: 'umd',
2021-05-07 08:54:14 +00:00
filename: 'lsplugin.user.js',
path: path.resolve(__dirname, 'dist')
},
}