Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions server/rollup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path');
const rollup = require('rollup');

const rollupConfig = require('../rollup.config');
const { watchFiles } = require('./watch');

Expand All @@ -13,11 +13,16 @@ async function build({ filePath, bundleOptions, additionalConfig = {} }) {
const {
output: [{ code, modules }],
} = await bundle.generate(bundleOptions);

const fileToWatchPath = path.resolve(__dirname, '../lib');

const filesToWatch = Object.keys(modules)
.filter((fileName) => fileName.startsWith(fileToWatchPath))
.sort();

return {
code,
filesToWatch: Object.keys(modules)
.filter((fileName) => fileName.startsWith(__dirname))
.sort(),
filesToWatch,
};
}

Expand Down
1 change: 1 addition & 0 deletions watch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"include": ["^package\\.json$", "^\\.env$"]
},
"restart": {
"exclude": ["^lib/"],
"include": ["\\.js$", "\\.json"]
},
"throttle": 1000
Expand Down