Skip to content

How to configure a lib with multiple targets? #703

Closed Answered by Timeless0911
ViktorZhurbin asked this question in Q&A
Discussion options

You must be logged in to vote

Sure, just modify target in each item of lib array.

// rslib.config.ts
import { defineConfig } from '@rslib/core';

export default defineConfig({
  lib: [
    {
      format: 'esm',
      output: {
        target: 'web',
      },
    },
    {
      format: 'esm',
      output: {
        target: 'node',
      },
    },
  ],
});

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ViktorZhurbin
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants