Skip to content

Alias bug #5

@pcfreak30

Description

@pcfreak30
import { fixImportsPlugin } from "esbuild-fix-imports-plugin";
import { defineConfig } from "tsup";

export default defineConfig([
  {
    bundle: false,
    clean: true,
    dts: true,
    entry: ["src/**/*"],
    esbuildPlugins: [fixImportsPlugin()],
    external: ["fs", "path"],
    format: ["cjs"],
    outDir: "dist/cjs",
    outExtension: () => ({ js: ".cjs" }),
    sourcemap: true,
    target: "esnext",
    tsconfig: "./tsconfig.json",
  },
  {
    bundle: false,
    clean: true,
    dts: true,
    entry: ["src/**/*"],
    esbuildPlugins: [fixImportsPlugin()],
    external: ["fs", "path"],
    format: ["esm"],
    outDir: "dist/esm",
    sourcemap: true,
    target: "esnext",
    tsconfig: "./tsconfig.json",
  },
]);

libs/portal-framework-ui-core/src/components/ui/alert.tsx

import { cn } from "@/lib/utils";
import { cva, type VariantProps } from "class-variance-authority";
import * as React from "react";

libs/portal-framework-ui-core/dist/esm/components/ui/alert.js

import "../../chunk-7QVYU63E.js";
import { cn } from "./../../src/lib/utils.js";
import { cva } from "class-variance-authority";
import * as React from "react";

true location -> libs/portal-framework-ui-core/dist/esm/util/cn.js

A bug with path resolution is causing the wrong generated output.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions