Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Should tslib be a production dependency? #451

@mtorp

Description

@mtorp

Describe the bug

When I try to import VSCodeButton (import { VSCodeButton } from '@vscode/webview-ui-toolkit/react';), I'm getting the following error:

    Cannot find module 'tslib' from '../../node_modules/.pnpm/@[email protected][email protected]/node_modules/@vscode/webview-ui-toolkit/dist/button/index.js'

    Require stack:
..../node_modules/.pnpm/@[email protected][email protected]/node_modules/@vscode/webview-ui-toolkit/dist/button/index.js
..../node_modules/.pnpm/@[email protected][email protected]/node_modules/@vscode/webview-ui-toolkit/dist/custom-elements.js
..../node_modules/.pnpm/@[email protected][email protected]/node_modules/@vscode/webview-ui-toolkit/dist/index.js
..../node_modules/.pnpm/@[email protected][email protected]/node_modules/@vscode/webview-ui-toolkit/react/index.js
...........

In ./dist/button/index.js there is an import of tslib (import { __decorate } from "tslib";), but tslib is defined as dev dependency of vscode-webview-ui-toolkit.

To reproduce

Run the import as above

Desktop (please complete the following information):

  • OS Version: macOS 13.1
  • Toolkit Version: 1.2.1

I'm using pnpm version 7.5.2

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions