webpack.config.core.js 712 B

1234567891011121314151617181920212223242526272829303132
  1. const webpack = require('webpack')
  2. const path = require('path')
  3. const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
  4. module.exports = {
  5. entry: './src/LSPlugin.core.ts',
  6. devtool: 'inline-source-map',
  7. module: {
  8. rules: [
  9. {
  10. test: /\.tsx?$/,
  11. use: 'ts-loader',
  12. exclude: /node_modules/,
  13. },
  14. ],
  15. },
  16. resolve: {
  17. extensions: ['.tsx', '.ts', '.js'],
  18. },
  19. plugins: [
  20. new webpack.ProvidePlugin({
  21. process: 'process/browser',
  22. }),
  23. // new BundleAnalyzerPlugin()
  24. ],
  25. output: {
  26. library: 'LSPlugin',
  27. libraryTarget: 'umd',
  28. filename: 'lsplugin.core.js',
  29. path: path.resolve(__dirname, '../static/js'),
  30. },
  31. }