chore: merge blocksuite source code (#9213)

This commit is contained in:
Mirone
2024-12-20 15:38:06 +08:00
committed by GitHub
parent 2c9ef916f4
commit 30200ff86d
2031 changed files with 238888 additions and 229 deletions

View File

@@ -0,0 +1,38 @@
import path from 'node:path';
import {
hmrPlugin as wcHmrPlugin,
presets,
} from 'vite-plugin-web-components-hmr';
import { fineTuneHmr } from './fine-tune.js';
const customLitPath = path.resolve(
__dirname,
'../../../blocks/src/_legacy/index.js'
);
const include = ['../blocks/src/**/*'];
const exclude = ['**/*/node_modules/**/*'];
// https://vitejs.dev/config/
export const hmrPlugin = process.env.WC_HMR
? [
wcHmrPlugin({
include,
exclude,
presets: [presets.lit],
decorators: [{ name: 'customElement', import: 'lit/decorators.js' }],
baseClasses: [
{
name: 'ShadowlessElement',
import: customLitPath,
},
],
}),
fineTuneHmr({
include,
exclude,
}),
]
: [];