mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-06 02:30:47 -08:00
fix: copy non-ugilified tiddlywiki source to the dist
This commit is contained in:
parent
a646610d23
commit
ee7cf2c5f7
3 changed files with 20 additions and 2 deletions
|
|
@ -4,17 +4,27 @@ const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
|||
const CspHtmlWebpackPlugin = require('csp-html-webpack-plugin');
|
||||
const CircularDependencyPlugin = require('circular-dependency-plugin');
|
||||
const path = require('path');
|
||||
const fs = require('fs-extra');
|
||||
const webpack = require('webpack');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
const ThreadsPlugin = require('threads-plugin');
|
||||
const ExternalsPlugin = require('webpack5-externals-plugin');
|
||||
const EventHooksPlugin = require('event-hooks-webpack-plugin');
|
||||
|
||||
exports.main = [
|
||||
// we only need one instance of TsChecker, it will check main and renderer all together
|
||||
new ForkTsCheckerWebpackPlugin(),
|
||||
new CopyPlugin({
|
||||
// to is relative to ./.webpack/main/
|
||||
patterns: [{ from: 'localization', to: 'localization' }],
|
||||
patterns: [
|
||||
{ from: 'localization', to: 'localization' },
|
||||
],
|
||||
}),
|
||||
new EventHooksPlugin({
|
||||
'afterEmit': (compilation, done) => {
|
||||
console.log('Copying tiddlywiki dependency to dist');
|
||||
void fs.copy('node_modules/@tiddlygit/tiddlywiki', './.webpack/node_modules/@tiddlygit/tiddlywiki', done);
|
||||
},
|
||||
}),
|
||||
new CircularDependencyPlugin({
|
||||
// exclude detection of files based on a RegExp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue