Open simonphughes opened 1 year ago
Same problem. Removing serverless-webpack from plugins list solves the issue.
Hey @simonphughes I manage to solve the issue by adding *.js to the webpack configuration:
module.exports = {
resolve: {
extensions: ['.mjs', '.json', '.ts', '.js'],
symlinks: false,
cacheWithContext: false
},
...
I have a typescript v3 project, and i have tried following the instructions by adding in the add-in.
If I run the sls generate-swagger command then it creates me a swagger directory, but if i try and deploy normally then i get the following webpack error: in ./swagger/swagger-json.js 3:16-36 Module not found: Error: Can't resolve './swagger' in 'C:\myfolderstructure\swagger' resolve './swagger' in 'C:\myfolderstructure\swagger' using description file: C:\myfolderstructure\package.json (relative path: ./swagger) using description file: C:\myfolderstructure\package.json (relative path: ./swagger/swagger) no extension C:\myfolderstructure\swagger\swagger doesn't exist .mjs C:\myfolderstructure\swagger\swagger.mjs doesn't exist .json C:\myfolderstructure\swagger\swagger.json doesn't exist .ts C:\myfolderstructure\swagger\swagger.ts doesn't exist js C:\myfolderstructure\swagger\swaggerjs doesn't exist as directory C:\myfolderstructure\swagger\swagger doesn't exist
Any help much appreciated.