webpack.config.js 567 B

123456789101112131415161718192021222324252627
  1. const path = require('path')
  2. const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
  3. module.exports = {
  4. entry: './src/LSPlugin.user.ts',
  5. module: {
  6. rules: [
  7. {
  8. test: /\.tsx?$/,
  9. use: 'ts-loader',
  10. exclude: /node_modules/,
  11. },
  12. ],
  13. },
  14. resolve: {
  15. extensions: ['.tsx', '.ts', '.js'],
  16. },
  17. plugins: [
  18. // new BundleAnalyzerPlugin()
  19. ],
  20. output: {
  21. library: "LSPluginEntry",
  22. libraryTarget: "umd",
  23. filename: 'lsplugin.user.js',
  24. path: path.resolve(__dirname, 'dist')
  25. },
  26. }