mirror of
https://github.com/teableio/teable.git
synced 2026-02-04 14:44:28 +08:00
* feat: using worker parse csv * fix: import multiple column error * feat: update webpack config for import worker * fix: vitest worker file path error * fix: excel import missing key * feat: using `convertCellValue2DBValue` transfer cellvalue * feat: add workerId escape conflict * fix: sqlite e2e error * feat: compact filter input
31 lines
860 B
JavaScript
31 lines
860 B
JavaScript
const path = require('path');
|
|
const CopyPlugin = require('copy-webpack-plugin');
|
|
const glob = require('glob');
|
|
|
|
module.exports = function (options) {
|
|
const workerFiles = glob.sync(path.join(__dirname, 'src/worker/**.ts'));
|
|
const workerEntries = workerFiles.reduce((acc, file) => {
|
|
const relativePath = path.relative(path.join(__dirname, 'src/worker'), file);
|
|
const entryName = `worker/${path.dirname(relativePath)}/${path.basename(relativePath, '.ts')}`;
|
|
acc[entryName] = file;
|
|
return acc;
|
|
}, {});
|
|
|
|
return {
|
|
...options,
|
|
entry: {
|
|
index: options.entry,
|
|
...workerEntries,
|
|
},
|
|
output: {
|
|
path: path.join(__dirname, 'dist'),
|
|
filename: '[name].js',
|
|
},
|
|
plugins: [
|
|
new CopyPlugin({
|
|
patterns: [{ from: 'src/features/mail-sender/templates', to: 'templates' }],
|
|
}),
|
|
],
|
|
};
|
|
};
|