Skip to content

Commit

Permalink
Fix NPM package cannot be found when ts moduleResolution is set to 'b…
Browse files Browse the repository at this point in the history
…undler' (#65)

close #29
  • Loading branch information
justinbarry authored Feb 5, 2024
1 parent 5e0d06f commit 39fabfe
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
7 changes: 7 additions & 0 deletions .changeset/smart-deers-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@burnt-labs/abstraxion": minor
"demo-app": minor
"@burnt-labs/ui": minor
---

Now longer use a blanket export in package.json as it was causing some confusion for some bundlers. There is no longer a css alias for "@burnt-labs/abstraxion/style.css", dapps will need to `import "@burnt-labs/abstraxion/dist/index.css"` going forward.
2 changes: 1 addition & 1 deletion apps/abstraxion-dashboard/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Metadata } from "next";
import localFont from "next/font/local";
import { Providers } from "./providers";
import "./globals.css";
import "@burnt-labs/ui/styles.css";
import "@burnt-labs/ui/dist/index.css";

const akkuratLL = localFont({
src: [
Expand Down
2 changes: 1 addition & 1 deletion apps/demo-app/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import "./globals.css";
import { Inter } from "next/font/google";
import { AbstraxionProvider } from "@burnt-labs/abstraxion";
import "@burnt-labs/abstraxion/styles.css";
import "@burnt-labs/abstraxion/dist/index.css";

const inter = Inter({ subsets: ["latin"] });

Expand Down
2 changes: 1 addition & 1 deletion apps/demo-app/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
useModal,
} from "@burnt-labs/abstraxion";
import { Button } from "@burnt-labs/ui";
import "@burnt-labs/ui/styles.css";
import "@burnt-labs/ui/dist/index.css";
import type { ExecuteResult } from "@cosmjs/cosmwasm-stargate";
import { seatContractAddress } from "./layout";

Expand Down
3 changes: 2 additions & 1 deletion apps/demo-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "@burnt-labs/tsconfig/nextjs.json",
"compilerOptions": {
"plugins": [{ "name": "next" }]
"plugins": [{ "name": "next" }],
"moduleResolution": "Bundler"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
Expand Down
4 changes: 0 additions & 4 deletions packages/abstraxion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": "./dist",
"./styles.css": "./dist/index.css"
},
"license": "MIT",
"scripts": {
"build": "tsup",
Expand Down
1 change: 0 additions & 1 deletion packages/abstraxion/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@burnt-labs/ui/styles.css";
import "./styles.css";

export { Abstraxion, AbstraxionProvider } from "./components/Abstraxion";
Expand Down
1 change: 1 addition & 0 deletions packages/abstraxion/src/styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import "@burnt-labs/ui/dist/index.css";
@tailwind base;
@tailwind components;
@tailwind utilities;
4 changes: 0 additions & 4 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": "./dist",
"./styles.css": "./dist/index.css"
},
"license": "MIT",
"scripts": {
"build": "tsup",
Expand Down

0 comments on commit 39fabfe

Please sign in to comment.