Skip to content

Commit fd5b70f

Browse files
committed
fix:swagger problem
1 parent b31c63b commit fd5b70f

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
{
2-
"name": "nestjs-vercel-deploy",
2+
"name": "offboard.studio.components.store",
33
"version": "0.0.1",
44
"description": "",
55
"author": "",
66
"private": true,
77
"license": "UNLICENSED",
8+
"pkg": {
9+
"assets": [
10+
"build/favicon-32x32.png",
11+
"build/favicon-16x16.png",
12+
"build/swagger-ui-standalone-preset.js",
13+
"build/swagger-ui-bundle.js",
14+
"build/swagger-ui.css"
15+
]
16+
},
817
"scripts": {
918
"build": "nest build",
1019
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",

webpack.config.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
var path = require('path');
2+
3+
const CopyWebpackPlugin = require('copy-webpack-plugin');
4+
5+
module.exports = {
6+
entry: './src/main.ts',
7+
target: "node",
8+
devtool: 'inline-source-map',
9+
mode: 'development', // or 'development' if you are in dev mode
10+
output: {
11+
path: path.resolve(__dirname, 'build'),
12+
filename: 'bundle.js'
13+
},
14+
resolve: {
15+
extensions: ['.ts', '.js'] //resolve all the modules other than index.ts
16+
},
17+
stats: {
18+
warnings: false
19+
},
20+
module: {
21+
rules: [
22+
{
23+
test: /\.ts$/,
24+
loader: 'ts-loader',
25+
options: {
26+
configFile: path.resolve(__dirname, 'tsconfig.json') // Add this line to explicitly reference tsconfig.json
27+
},
28+
exclude: /node_modules/,
29+
},
30+
]
31+
},
32+
plugins: [
33+
new CopyWebpackPlugin({
34+
patterns: [
35+
// { from: 'src/index.html', to: 'index.html' }, // Adjust the source path as needed
36+
// { from: 'src/swagger.json', to: 'swagger.json' }, // Adjust the source path as needed
37+
{ from: 'node_modules/swagger-ui-dist/swagger-ui.css', to: 'swagger-ui.css' },
38+
{ from: 'node_modules/swagger-ui-dist/swagger-ui-bundle.js', to: 'swagger-ui-bundle.js' },
39+
{ from: 'node_modules/swagger-ui-dist/swagger-ui-standalone-preset.js', to: 'swagger-ui-standalone-preset.js' },
40+
{ from: 'node_modules/swagger-ui-dist/favicon-16x16.png', to: 'favicon-16x16.png' },
41+
{ from: 'node_modules/swagger-ui-dist/favicon-32x32.png', to: 'favicon-32x32.png' }
42+
]
43+
})
44+
]
45+
}

0 commit comments

Comments
 (0)