-
-
Notifications
You must be signed in to change notification settings - Fork 4k
chore: build using rspack and swc #9836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
55917de
chore: build to rspack and swc
DarkPhoenix2704 d85d8e9
wip: rspack
DarkPhoenix2704 0315045
fix: rspack with hmr for local dev
DarkPhoenix2704 42472bd
fix: pino pretty in local dev
DarkPhoenix2704 ee362be
fix: moved all local dev config
DarkPhoenix2704 6fb6d47
fix: add missing dependencies
DarkPhoenix2704 8762049
fix: unit tests ci
DarkPhoenix2704 d493776
fix: add tsconfig type checking
DarkPhoenix2704 b2e7ddf
fix: ignore watch node_modules
DarkPhoenix2704 e430aae
fix: rspack build
DarkPhoenix2704 da95078
feat: add type checker
DarkPhoenix2704 44fa21d
fix: swagger tests
DarkPhoenix2704 dfaaa2f
fix: gtihub actions
DarkPhoenix2704 09ca9f8
fix: do not remove nocodb-sdk
DarkPhoenix2704 83f4bc4
fix: build workflow
DarkPhoenix2704 1f8577c
fix: update rspack config
DarkPhoenix2704 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,77 @@ | ||
const path = require('path'); | ||
const { rspack } = require('@rspack/core'); | ||
const { resolveTsAliases } = require('../build-utils/resolveTsAliases'); | ||
const nodeExternals = require('webpack-node-externals'); | ||
module.exports = { | ||
entry: './src/run/dockerEntry.ts', | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.node$/, | ||
loader: 'node-loader', | ||
options: { | ||
name: '[path][name].[ext]', | ||
}, | ||
}, | ||
{ | ||
test: /\.tsx?$/, | ||
exclude: /node_modules/, | ||
loader: 'builtin:swc-loader', | ||
options: { | ||
jsc: { | ||
parser: { | ||
syntax: 'typescript', | ||
tsx: true, | ||
decorators: true, | ||
dynamicImport: true, | ||
}, | ||
transform: { | ||
legacyDecorator: true, | ||
decoratorMetadata: true, | ||
}, | ||
target: 'es2017', | ||
}, | ||
module: { | ||
type: 'commonjs', | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
resolve: { | ||
extensions: ['.tsx', '.ts', '.js', '.json'], | ||
alias: resolveTsAliases(path.resolve('tsconfig.json')), | ||
}, | ||
output: { | ||
path: require('path').resolve('./docker'), | ||
filename: 'main.js', | ||
library: 'libs', | ||
libraryTarget: 'umd', | ||
globalObject: "typeof self !== 'undefined' ? self : this", | ||
}, | ||
optimization: { | ||
minimize: true, //Update this to true or false | ||
minimizer: [ | ||
new rspack.SwcJsMinimizerRspackPlugin({ | ||
minimizerOptions: { | ||
compress: { | ||
keep_classnames: true, | ||
}, | ||
}, | ||
}), | ||
], | ||
nodeEnv: false, | ||
}, | ||
externals: [nodeExternals({ | ||
allowlist: ['nocodb-sdk'] | ||
})], | ||
plugins: [ | ||
new rspack.EnvironmentPlugin({ | ||
EE: true, | ||
}), | ||
], | ||
target: 'node', | ||
node: { | ||
__dirname: false, | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.