My dotfiles
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

webpack.config.js 756 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. const path = require('path')
  2. /** @type {import('webpack').Configuration} */
  3. module.exports = {
  4. entry: {
  5. index: './src/index.ts',
  6. server: './src/server.ts',
  7. scan: './src/scan.ts'
  8. },
  9. target: 'node',
  10. mode: 'production',
  11. resolve: {
  12. mainFields: ['module', 'main'],
  13. extensions: ['.js', '.ts']
  14. },
  15. externals: {
  16. 'coc.nvim': 'commonjs coc.nvim'
  17. },
  18. module: {
  19. rules: [
  20. {
  21. test: /\.ts$/,
  22. exclude: /node_modules/,
  23. use: [
  24. {
  25. loader: 'ts-loader'
  26. }
  27. ]
  28. }
  29. ]
  30. },
  31. output: {
  32. path: path.join(__dirname, 'out'),
  33. filename: '[name].js',
  34. libraryTarget: 'commonjs'
  35. },
  36. plugins: [],
  37. node: {
  38. __dirname: false,
  39. __filename: false
  40. }
  41. }