Skip to content

@rollup/plugin-run and typescript tsconfig.json paths aliases ? #1598

Description

@MarcWeber
  • Rollup Plugin Name:
  • Rollup Plugin Version:

Documentation Is:

  • Missing
  • Needed
  • Confusing
  • [X ] Not Sure?

Please Explain in Detail...

Your Proposal for Changes

import run from '@rollup/plugin-run';
import typescript from "@rollup/plugin-typescript"
import tsConfigPaths from "rollup-plugin-tsconfig-paths"

export default {
  input: 'test/test.ts',
  output: {
    file: 'dist/index.js',
    format: 'cjs'
  },
  plugins: [
    tsConfigPaths({tsConfigPath: 'tsconfig.json'}),
    typescript({tsconfig: 'tsconfig.json'}),
    run(),
  ]
};

Commenting run it transpiles. However with run() I get errors that modules aren't found specified by tsconfig.json paths aliases.
So it would be nice if you could add an example to rollup run how to run typecsript code with tsconfig.json.

Activity

  1. locked and limited conversation to collaborators on Sep 30, 2023
  2. converted this issue into a discussion #1599 on Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions