Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

build: add sourceMaps and inlineSourcesContent option to swc (#6234)

EYHN3edf32b1df69
diff --git a/packages/frontend/templates/templates.gen.ts b/packages/frontend/templates/templates.gen.ts
index 6858f0b2b3..d95d5c0eed 100644
--- a/packages/frontend/templates/templates.gen.ts
+++ b/packages/frontend/templates/templates.gen.ts
@@ -1,11 +1,11 @@
/* eslint-disable simple-import-sort/imports */
// Auto generated, do not edit manually
-import json_0 from './onboarding/info.json';
-import json_1 from './onboarding/blob.json';
-import json_2 from './onboarding/W-d9_llZ6rE-qoTiHKTk4.snapshot.json';
+import json_0 from './onboarding/W-d9_llZ6rE-qoTiHKTk4.snapshot.json';
+import json_1 from './onboarding/info.json';
+import json_2 from './onboarding/blob.json';
export const onboarding = {
- 'info.json': json_0,
- 'blob.json': json_1,
- 'W-d9_llZ6rE-qoTiHKTk4.snapshot.json': json_2
+ 'W-d9_llZ6rE-qoTiHKTk4.snapshot.json': json_0,
+ 'info.json': json_1,
+ 'blob.json': json_2
}
\ No newline at end of file
diff --git a/tools/cli/src/webpack/config.ts b/tools/cli/src/webpack/config.ts
index c379534862..489ea4efb7 100644
--- a/tools/cli/src/webpack/config.ts
+++ b/tools/cli/src/webpack/config.ts
@@ -251,7 +251,7 @@ export const createConfiguration: (
{
test: /\.tsx?$/,
exclude: /node_modules/,
- loader: require.resolve('swc-loader'),
+ loader: 'swc-loader',
options: {
// https://swc.rs/docs/configuring-swc/
jsc: {
@@ -277,6 +277,8 @@ export const createConfiguration: (
useDefineForClassFields: false,
},
},
+ sourceMaps: true,
+ inlineSourcesContent: true,
},
},
{