I seem to have identified the cause of my problem.
At least ScrollToPlugin is now working.
As it turns out, it had nothing to do with GSAP, but I'll leave my solution in this forum for anyone else facing the same problem.
The cause was the lack of output.format:'iife' in my rollup config.
Here is my final rollup.config.mjs code.
import { dirname, resolve } from 'path';
import { nodeResolve } from '@rollup/plugin-node-resolve';
export default {
input: [
resolve(dirname(new URL(import.meta.url).pathname), './src/index.js'),
],
output: {
entryFileNames: '[name].js',
dir: 'public',
format: 'iife',
},
plugins: [
nodeResolve({
extensions: ['.js'],
}),
],
};
Finally, thanks again to @GreenSock for the advice!