Skip to content

Commit ab80bf7

Browse files
committed
fix: bundling
1 parent 493a1b5 commit ab80bf7

File tree

7 files changed

+13
-15
lines changed

7 files changed

+13
-15
lines changed

apps/api/src/modules/v1/qr/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
DEFAULT_MARGIN,
1111
DEFAULT_SIZE,
1212
QR_LEVELS,
13-
} from "tinyqrc/constants";
13+
} from "tinyqrc";
1414
import { InternalServerError } from "@/lib/errors";
1515
import { generateHash } from "@/utils/hash";
1616

apps/web/lib/qr/store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
DEFAULT_MARGIN,
55
DEFAULT_SIZE,
66
type QR_LEVELS,
7-
} from "tinyqrc/constants";
7+
} from "tinyqrc";
88
import type { QRData, QRDataType } from "@/lib/qr/types";
99
import { generateSVG } from "tinyqrc";
1010

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "web",
2+
"name": "@tinyqrc/web",
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {

bun.lockb

8 Bytes
Binary file not shown.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"private": true,
44
"scripts": {
55
"build": "turbo run build",
6+
"build:web": "turbo run build --filter=@tinyqrc/web",
67
"deploy:api": "bun run --filter=@tinyqrc/api deploy",
78
"dev": "turbo run dev",
89
"lint": "turbo run lint",

packages/tinyqrc/package.json

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tinyqrc",
33
"description": "A tiny QR code generator, written in TypeScript.",
4-
"version": "0.0.5",
4+
"version": "0.0.6",
55
"author": "Christo Todorov <[email protected]>",
66
"license": "MIT",
77
"repository": "https://github.com/chroxify/tinyqrc",
@@ -13,27 +13,23 @@
1313
"qr-code-generator-typescript",
1414
"qr-code-generator-typescript-library"
1515
],
16-
"main": "./dist/index.js",
17-
"module": "./dist/index.mjs",
16+
"main": "./dist/index.cjs",
17+
"module": "./dist/index.js",
1818
"types": "./dist/index.d.ts",
1919
"files": [
2020
"dist"
2121
],
2222
"exports": {
2323
".": {
2424
"types": "./dist/index.d.ts",
25-
"import": "./dist/index.mjs",
26-
"require": "./dist/index.js"
27-
},
28-
"./constants": {
29-
"types": "./dist/constants.d.ts",
30-
"import": "./dist/constants.mjs",
31-
"require": "./dist/constants.js"
25+
"import": "./dist/index.js",
26+
"require": "./dist/index.cjs"
3227
}
3328
},
3429
"scripts": {
35-
"build": "tsc && tsc --module ESNext --outDir dist/esm && mv dist/esm/index.js dist/index.mjs && rm -rf dist/esm",
36-
"dev": "tsc --watch",
30+
"build": "bun build ./src/index.ts --outdir dist --target node --minify --sourcemap && bun build ./src/index.ts --outdir dist --target node --minify --sourcemap --format cjs && bun build ./src/index.ts --outdir dist --target node --minify --sourcemap --format esm && bun run build:types",
31+
"build:types": "tsc --emitDeclarationOnly --declaration --outDir dist",
32+
"dev": "bun build ./src/index.ts --outdir dist --target node --watch",
3733
"clean": "rm -rf dist",
3834
"prepublishOnly": "bun run build"
3935
},

packages/tinyqrc/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ export {
66
DEFAULT_LEVEL,
77
DEFAULT_MARGIN,
88
DEFAULT_SIZE,
9+
QR_LEVELS,
910
} from "./constants";

0 commit comments

Comments
 (0)