-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1985f79
commit 33b4dc4
Showing
10 changed files
with
103 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# port 端口号 | ||
VITE_API_URL = http://localhost:9190/ | ||
VITE_WEB_URL = http://localhost:9191/ | ||
VITE_WEB_URL = http://localhost:9191/ | ||
|
||
PORT=9190 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# @pear-rec/desktop | ||
|
||
## 1.3.5 | ||
|
||
feat: 增加服务子进程 | ||
|
||
## 1.3.4 | ||
|
||
feat: 重置设置、显示快捷键 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
// fork-ts-checker-webpack-plugin需要单独安装 | ||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); | ||
const CopyPlugin = require('copy-webpack-plugin'); | ||
|
||
module.exports = { | ||
entry: './src/main', | ||
target: 'node', | ||
// 置为空即可忽略webpack-node-externals插件 | ||
externals: {}, | ||
module: { | ||
noParse: /sql.js/, | ||
rules: [ | ||
{ | ||
test: /\.ts?$/, | ||
use: { | ||
loader: 'ts-loader', | ||
options: { transpileOnly: true }, | ||
}, | ||
exclude: /node_modules/, | ||
}, | ||
], | ||
}, | ||
// 打包后的文件名称以及位置 | ||
output: { | ||
filename: 'main.js', | ||
path: path.resolve(__dirname, 'dist'), | ||
}, | ||
resolve: { | ||
extensions: ['.js', '.ts', '.json'], | ||
}, | ||
plugins: [ | ||
// 需要进行忽略的插件 | ||
new webpack.IgnorePlugin({ | ||
checkResource(resource) { | ||
const lazyImports = [ | ||
'@fastify/static', | ||
'@nestjs/microservices', | ||
'@nestjs/microservices/microservices-module', | ||
'@nestjs/websockets/socket-module', | ||
'cache-manager', | ||
'class-validator', | ||
'class-transformer' | ||
]; | ||
if (!lazyImports.includes(resource)) { | ||
return false; | ||
} | ||
try { | ||
require.resolve(resource, { | ||
paths: [process.cwd()], | ||
}); | ||
} catch (err) { | ||
return true; | ||
} | ||
return false; | ||
}, | ||
}), | ||
new ForkTsCheckerWebpackPlugin(), | ||
new CopyPlugin({ | ||
patterns: [{ | ||
from: './node_modules/sql.js/dist/sql-wasm.wasm' | ||
}] | ||
}), | ||
], | ||
}; |