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

esbuild plugin does not do anything at all #1432

Open
MazeChaZer opened this issue Jan 20, 2025 · 0 comments
Open

esbuild plugin does not do anything at all #1432

MazeChaZer opened this issue Jan 20, 2025 · 0 comments
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided

Comments

@MazeChaZer
Copy link

Environment

  • Linaria version: 6.2.0
  • Bundler (+ version): esbuild 0.24.2, @wyw-in-js/esbuild 0.5.5
  • Node.js version: 23.4.0
  • OS: Arch Linux

Description

I added the linaria plugin to the esbuild config, but it does not do anything.

Reproducible Demo

  1. Create an empty directory
  2. npm install @linaria/core @wyw-in-js/babel-preset @wyw-in-js/esbuild esbuild
  3. Add src/index.ts with the following content:
import { css } from "@linaria/core"

const className = css`
    width: 100px;
`
  1. Add esbuild.mjs, copy content from docs:
import wyw from '@wyw-in-js/esbuild';
import esbuild from 'esbuild';

const prod = process.env.NODE_ENV === 'production';

esbuild
  .build({
    entryPoints: ['src/index.ts'],
    outdir: 'dist',
    bundle: true,
    minify: prod,
    plugins: [
      wyw({
        filter: /\.(js|jsx|ts|tsx)$/,
        sourceMap: prod,
      }),
    ],
  })
  .catch(() => process.exit(1));
  1. node esbuild.mjs

Example as a zip file: linaria-repro.zip

@MazeChaZer MazeChaZer added bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided needs: triage 🏷 Issue needs to be checked and prioritized labels Jan 20, 2025
@github-actions github-actions bot removed the needs: triage 🏷 Issue needs to be checked and prioritized label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided
Projects
None yet
Development

No branches or pull requests

1 participant