Skip to content

Build your personal knowledge base with Trilium Notes

chore(monorepo/server): set up copy of bettersqlite

Elian Dorande944576b63a
diff --git a/apps/server/webpack.config.cjs b/apps/server/webpack.config.cjs
index 3a50b84945..6d65d59299 100644
--- a/apps/server/webpack.config.cjs
+++ b/apps/server/webpack.config.cjs
@@ -1,9 +1,12 @@
const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin');
+const CopyPlugin = require('copy-webpack-plugin');
const { join } = require('path');
+const outputDir = join(__dirname, 'dist');
+
module.exports = {
output: {
- path: join(__dirname, 'dist')
+ path: outputDir
},
plugins: [
new NxAppWebpackPlugin({
@@ -15,6 +18,14 @@ module.exports = {
optimization: false,
outputHashing: 'none',
generatePackageJson: true,
+ }),
+ new CopyPlugin({
+ patterns: [
+ {
+ from: "node_modules/better-sqlite3/build/Release",
+ to: join(outputDir, "Release")
+ }
+ ]
})
]
};
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index df454d61d8..1940149c57 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -1,17 +1,17 @@
packages:
- - packages/*
- - apps/*
+- packages/*
+- apps/*
ignoredBuiltDependencies:
- - '@parcel/watcher'
- - '@scarf/scarf'
- - '@swc/core'
- - better-sqlite3
- - bufferutil
- - core-js-pure
- - esbuild
- - nx
- - utf-8-validate
+- '@parcel/watcher'
+- '@scarf/scarf'
+- '@swc/core'
+- bufferutil
+- core-js-pure
+- esbuild
+- nx
+- utf-8-validate
onlyBuiltDependencies:
- - electron
+- electron
+- better-sqlite3