Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imports that should be server-only aren't removed in dev if verbatimModuleSyntax: true #308

Open
Brendonovich opened this issue Jun 8, 2024 · 0 comments

Comments

@Brendonovich
Copy link
Contributor

Brendonovich commented Jun 8, 2024

From solidjs/solid-start#1526

With a Solid Start app.tsx like this:

import { executionAsyncId } from 'node:async_hooks';

async function getAsyncID() {
  'use server';
  return executionAsyncId();
}

export default function App() {
  getAsyncID()

Builds fail when verbatimModuleSyntax in tsconfig.json is true, since that tells esbuild to not drop unused import statements, and the node:async_hooks import is kept in the client build even though it's not used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant