#Rollup not resolving separate packages

1 messages · Page 1 of 1 (latest)

late void
#

In my monorepo TS project, I import a few separate packages of my own also written in TS.

When I try building the project, Rollup says it was successful, but when I check the output file, the modules that come from those packages aren't written as import thing from "@my/absolute/path. I don't know what the problem is here, if it's TypeScript path aliases not resolving (they are resolving for my local modules, only for separate packages it doesn't work), or if it's because they're separate packages.

#

I am using @rollup/plugin-typescript too. Here is my Rollup config:

import resolve from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';

/**
 * @type {import('rollup').RollupOptions}
 */
const rollupConfig =
{
    input: 'index.ts',
    output: [
        {
            dir: 'dist',
            format: 'es',
        }
    ],
    external: /node_modules/,
    preserveSymlinks: true, // This option is necessary to resolve @quacker dependencies
    plugins: [
        resolve(),
        typescript({ tsconfig: './tsconfig.json' }),
    ]
};

export default rollupConfig;```