Browse Source

feat: add type checker

nc-rspack-swc
DarkPhoenix2704 1 week ago
parent
commit
da95078c0e
No known key found for this signature in database
GPG Key ID: 3F76B10622A07849
  1. 2
      packages/nocodb/package.json
  2. 7
      packages/nocodb/rspack.dev.config.js

2
packages/nocodb/package.json

@ -38,7 +38,7 @@
"watch:run:pg": "cross-env NODE_ENV=development NC_DISABLE_TELE=true rspack serve --config rspack.dev.config.js --entry src/run/dockerRunPG",
"watch:run:playwright": "rm -f ./test_*.db; cross-env DB_TYPE=sqlite DATABASE_URL=sqlite:./test_noco.db PLAYWRIGHT_TEST=true NODE_ENV=test NC_DISABLE_TELE=true NC_SNAPSHOT_WINDOW_SEC=3 rspack serve --config rspack.dev.config.js --entry src/run/testDocker",
"watch:run:playwright:mysql": "rm -f ./test_noco.db; cross-env DB_TYPE=mysql NC_DB=\"mysql2://localhost:3306?u=root&p=password&d=pw_ncdb\" PLAYWRIGHT_TEST=true NODE_ENV=test NC_DISABLE_TELE=true rspack serve --config rspack.dev.config.js --entry src/run/testDocker",
"watch:run:playwright:pg": "rm -f ./test_noco.db; cross-env DB_TYPE=pg NC_DB=\"pg://localhost:5432?u=postgres&p=password&d=pw_ncdb\" PLAYWRIGHT_TEST=true NODE_ENV=test NC_DISABLE_TELE=true rspack serve --config rspack.dev.config.js --entry src/run/testDocke",
"watch:run:playwright:pg": "rm -f ./test_noco.db; cross-env DB_TYPE=pg NC_DB=\"pg://localhost:5432?u=postgres&p=password&d=pw_ncdb\" PLAYWRIGHT_TEST=true NODE_ENV=test NC_DISABLE_TELE=true rspack serve --config rspack.dev.config.js --entry src/run/testDocker",
"watch:run:playwright:quick": "rm -f ./test_noco.db; cp ../../tests/playwright/fixtures/noco_0_91_7.db ./test_noco.db; cross-env NODE_ENV=test DATABASE_URL=sqlite:./test_noco.db NC_DISABLE_TELE=true rspack serve --config rspack.dev.config.js --entry src/run/docker",
"watch:run:playwright:pg:cyquick": "rm -f ./test_noco.db; cp ../../tests/playwright/fixtures/noco_0_91_7.db ./test_noco.db; cross-env NODE_ENV=test NC_DISABLE_TELE=true rspack serve --config rspack.dev.config.js --entry src/run/dockerRunPG_CyQuick.ts",
"test:unit": "cross-env NODE_ENV=test TS_NODE_PROJECT=./tests/unit/tsconfig.json mocha --require @swc-node/register tests/unit/index.test.ts --recursive --timeout 300000 --exit --delay",

7
packages/nocodb/rspack.dev.config.js

@ -3,7 +3,7 @@ const { rspack } = require('@rspack/core');
const NodeExternals = require('webpack-node-externals');
const { RunScriptWebpackPlugin } = require('run-script-webpack-plugin');
const {resolveTsAliases} = require("./build-utils/resolveTsAliases");
// const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const baseDevConfig = {
mode: 'development',
@ -88,6 +88,11 @@ const baseDevConfig = {
new RunScriptWebpackPlugin({
name: 'main.js',
}),
new ForkTsCheckerWebpackPlugin({
typescript: {
configFile: join('tsconfig.json'),
},
}),
],
output: {
path: join(__dirname, 'dist'),

Loading…
Cancel
Save