mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 23:29:55 +01:00
11 lines
514 B
Markdown
11 lines
514 B
Markdown
|
|
# Server-side imports
|
||
|
|
Older versions of Trilium Notes allowed the use of Common.js module imports inside backend scripts, such as:
|
||
|
|
|
||
|
|
```
|
||
|
|
const isBetween = require('dayjs/plugin/isBetween')
|
||
|
|
api.dayjs.extend(isBetween)
|
||
|
|
```
|
||
|
|
|
||
|
|
For newer versions, Node.js imports are **not officially supported anymore**, since we've added a bundler which makes it more difficult to reuse dependencies.
|
||
|
|
|
||
|
|
Theoretically it's still possible to use imports by manually setting up a `node_modules` in the server directory via `npm` or `pnpm`.
|