penumbra-zone / web

Apache License 2.0
15 stars 16 forks source link

Dropping the /src/ #762

Closed grod220 closed 6 months ago

grod220 commented 8 months ago

In https://github.com/penumbra-zone/web/pull/672 we removed a number of barrel files. While this is more performant, we are now appending /src/ to a bunch of imports:

import { createChannelTransport } from '@penumbra-zone/transport-dom/src/create';

It would be nice to be able to drop this and have:

import { createChannelTransport } from '@penumbra-zone/transport-dom/create';

Also, this is largely not an issue with external code imports as they can do:

    "exports": {
      ".": "./dist/prax.js",
      "./global": "./dist/global.js",
      "./get-port": "./dist/get-port.js"
    }

However, doing like so with internal code renders a type error

    "exports": {
      ".": "./src/prax.ts",
      "./global": "./src/global.ts",
      "./get-port": "./src/get-port.ts"
    }
turbocrime commented 8 months ago

this can be handled by publishConfig

turbocrime commented 6 months ago

there's actually a couple of these left, have some local work on it