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.

chore: ci fix & module split

DarkSky86d4449db4cf
diff --git a/apps/ligo-virgo/webpack.config.js b/apps/ligo-virgo/webpack.config.js
index 4bf721409c..11be2e1c76 100644
--- a/apps/ligo-virgo/webpack.config.js
+++ b/apps/ligo-virgo/webpack.config.js
@@ -43,6 +43,7 @@ module.exports = function (webpackConfig) {
...config.output,
filename: '[name].[contenthash:8].js',
chunkFilename: '[name].[chunkhash:8].js',
+ hashDigestLength: 8,
hashFunction: undefined,
};
config.optimization = {
@@ -67,21 +68,21 @@ module.exports = function (webpackConfig) {
chunks: 'all',
enforce: true,
},
- auth: {
- test: /[\\/]node_modules[\\/](@authing|@?firebase)/,
- name: 'auth',
- priority: -5,
- chunks: 'all',
- },
+ // auth: {
+ // test: /[\\/]node_modules[\\/](@authing|@?firebase)/,
+ // name: 'auth',
+ // priority: -5,
+ // chunks: 'all',
+ // },
edgeless: {
test: /(libs\/components\/board-|[\\/]node_modules[\\/]@tldraw)/,
name: 'edgeless',
priority: -7,
chunks: 'all',
},
- editor: {
+ paper: {
test: /(libs\/framework\/(ligo|virgo|editor)|[\\/]node_modules[\\/](@codemirror|@lezer|slate))/,
- name: 'editor',
+ name: 'paper',
priority: -8,
chunks: 'all',
},
@@ -176,7 +177,11 @@ module.exports = function (webpackConfig) {
publicPath: '/',
}),
new Style9Plugin(),
- isProd && new MiniCssExtractPlugin(),
+ isProd &&
+ new MiniCssExtractPlugin({
+ filename: '[name].[contenthash:8].css',
+ chunkFilename: '[id].[chunkhash:8].css',
+ }),
isProd &&
new CompressionPlugin({
test: /\.(js|css|html|svg|ttf|woff)$/,
diff --git a/apps/venus/webpack.config.js b/apps/venus/webpack.config.js
index def037d387..57c78f9f3b 100644
--- a/apps/venus/webpack.config.js
+++ b/apps/venus/webpack.config.js
@@ -39,6 +39,7 @@ module.exports = function (webpackConfig) {
...config.output,
filename: '[name].[contenthash:8].js',
chunkFilename: '[name].[chunkhash:8].js',
+ hashDigestLength: 8,
hashFunction: undefined,
};
config.optimization = {
@@ -98,22 +99,7 @@ module.exports = function (webpackConfig) {
},
],
});
- config.module.rules.unshift({
- test: /\.scss$/i,
- use: [
- 'style-loader',
- {
- loader: 'css-loader',
- options: {
- sourceMap: false,
- },
- },
- {
- loader: 'postcss-loader',
- },
- ],
- });
- config.module.rules.splice(6);
+ config.module.rules.splice(4);
} else {
config.output = {
...config.output,
@@ -155,7 +141,11 @@ module.exports = function (webpackConfig) {
template: path.resolve(__dirname, './src/template.html'),
publicPath: '/',
}),
- isProd && new MiniCssExtractPlugin(),
+ isProd &&
+ new MiniCssExtractPlugin({
+ filename: '[name].[contenthash:8].css',
+ chunkFilename: '[id].[chunkhash:8].css',
+ }),
isProd &&
new CompressionPlugin({
test: /\.(js|css|html|svg|ttf|woff)$/,
@@ -201,15 +191,6 @@ const addEmotionBabelPlugin = config => {
// See https://github.com/mui/material-ui/issues/27380#issuecomment-928973157
// See https://github.com/emotion-js/emotion/tree/main/packages/babel-plugin#importmap
importMap: {
- '@toeverything/components/ui': {
- styled: {
- canonicalImport: ['@emotion/styled', 'default'],
- styledBaseImport: [
- '@toeverything/components/ui',
- 'styled',
- ],
- },
- },
'@mui/material': {
styled: {
canonicalImport: ['@emotion/styled', 'default'],
diff --git a/libs/datasource/jwt/src/adapter/yjs/binary.ts b/libs/datasource/jwt/src/adapter/yjs/binary.ts
index 468710ac4a..26f82684af 100644
--- a/libs/datasource/jwt/src/adapter/yjs/binary.ts
+++ b/libs/datasource/jwt/src/adapter/yjs/binary.ts
@@ -1,15 +1,16 @@
import { Array as YArray, Map as YMap } from 'yjs';
-import { RemoteKvService } from '@toeverything/datasource/remote-kv';
+import type { RemoteKvService } from '@toeverything/datasource/remote-kv';
export class YjsRemoteBinaries {
private readonly _binaries: YMap<YArray<ArrayBuffer>>; // binary instance
private readonly _remoteStorage?: RemoteKvService;
- constructor(binaries: YMap<YArray<ArrayBuffer>>, remote_token?: string) {
+ constructor(binaries: YMap<YArray<ArrayBuffer>>, remoteToken?: string) {
this._binaries = binaries;
- if (remote_token) {
- this._remoteStorage = new RemoteKvService(remote_token);
+ if (remoteToken) {
+ // TODO: remote kv need to refactor, we may use cloudflare kv
+ // this._remoteStorage = new RemoteKvService(remote_token);
} else {
console.warn(`Remote storage is not ready`);
}