mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-07 21:47:02 +09:00
Add RSDoctor, a replacement for Bundle Analyzer and much more
This commit is contained in:
parent
50b923917c
commit
df59996a13
4 changed files with 1251 additions and 254 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -18,6 +18,7 @@ docs/*
|
|||
electron/env.json
|
||||
src/json/schema
|
||||
licenses.json
|
||||
dist/.rsdoctor
|
||||
|
||||
# generated by rspack
|
||||
/compilation-stats.json
|
||||
|
|
1497
package-lock.json
generated
1497
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -9,6 +9,8 @@
|
|||
"lint": "eslint .",
|
||||
"electron": "npx electron .",
|
||||
"electron-win": "npx electron.cmd .",
|
||||
"doctor:start:dev": "RSDOCTOR=true npm run start:dev",
|
||||
"doctor:build:dev": "RSDOCTOR=true npm run build:dev",
|
||||
"start:watch": "cross-env-shell rspack serve --mode=development --node-env=development --env SERVER_PORT=$SERVER_PORT --env DATA_PATH=$DATA_PATH",
|
||||
"start:electron-wait-rspack": "cross-env-shell wait-for-localhost $SERVER_PORT && npm run electron",
|
||||
"start:electron-wait-rspack-win": "cross-env-shell wait-for-localhost $SERVER_PORT && npm run electron-win",
|
||||
|
@ -48,6 +50,7 @@
|
|||
"homepage": "https://anytype.io",
|
||||
"devDependencies": {
|
||||
"@electron/notarize": "^2.5.0",
|
||||
"@rsdoctor/rspack-plugin": "^0.4.8",
|
||||
"@rspack/cli": "^1.1.0",
|
||||
"@rspack/core": "^1.1.0",
|
||||
"@rspack/plugin-react-refresh": "^1.0.0",
|
||||
|
|
|
@ -2,7 +2,7 @@ const path = require('path');
|
|||
const process = require('process');
|
||||
const rspack = require('@rspack/core');
|
||||
const ReactRefreshPlugin = require('@rspack/plugin-react-refresh');
|
||||
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||
const { RsdoctorRspackPlugin } = require('@rsdoctor/rspack-plugin');
|
||||
|
||||
const pdfjsDistPath = path.dirname(require.resolve('pdfjs-dist/package.json'));
|
||||
const cMapsDir = path.join(pdfjsDistPath, 'cmaps');
|
||||
|
@ -159,7 +159,7 @@ module.exports = (env, argv) => {
|
|||
|
||||
plugins: [
|
||||
!prod && new ReactRefreshPlugin(),
|
||||
//new BundleAnalyzerPlugin(),
|
||||
process.env.RSDOCTOR && new RsdoctorRspackPlugin({}),
|
||||
|
||||
// new rspack.IgnorePlugin({
|
||||
// resourceRegExp: /osx-temperature-sensor/,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue