completecoding / serverless-auto-swagger

80 stars 48 forks source link

get error "Cannot find module 'swagger-html'" when using this package with serverless-webpack #127

Open YeomDongUk opened 1 year ago

YeomDongUk commented 1 year ago
plugins:
  - serverless-auto-swagger
  - serverless-webpack
  - serverless-offline
const path = require('path');

module.exports = {
  entry: './src/handler.ts', 
  target: 'node', 
  mode: 'none',
  externals: [/aws-sdk/], /
  module: {
    rules: [
      {
        test: /\.ts$/, 
        use: ['ts-loader'], 
        exclude: /node_modules/, 
      },
    ],
  },
  resolve: {
    extensions: ['.mjs', '.json', '.ts', '.js'],
    symlinks: false,
    cacheWithContext: false,
  },
  output: {
    libraryTarget: 'commonjs',
    path: path.join(__dirname, '.webpack'), 
    filename: 'handler.js',
  },
};