feat(plugin): merge implementation

This commit is contained in:
charlie
2021-05-07 16:54:14 +08:00
parent 7a78e805fd
commit f3edb9b77f
20 changed files with 4292 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
const webpack = require('webpack')
const path = require('path')
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
module.exports = {
entry: './src/LSPlugin.core.ts',
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
plugins: [
new webpack.ProvidePlugin({
process: 'process/browser',
}),
// new BundleAnalyzerPlugin()
],
output: {
library: 'LSPlugin',
libraryTarget: 'umd',
filename: 'lsplugin.core.js',
path: path.resolve(__dirname, '../static/js'),
},
}