Skip to content

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

@MarcWeber

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions