Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

feat: use tsup instead tsc for single file dist #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"name": "crx-bridge",
"version": "3.0.1",
"description": "Messaging in Chrome extensions made easy. Out of the box.",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"main": "dist/index.mjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"watch": "tsc -w"
"build": "tsup src/index.ts --format esm,cjs --no-splitting --dts",
"watch": "npm run build -- --watch"
},
"repository": {
"type": "git",
Expand All @@ -33,18 +34,18 @@
"homepage": "https://github.com/NeekSandhu/crx-bridge#readme",
"devDependencies": {
"@types/node": "^8.0.46",
"@types/serialize-error": "^4.0.1",
"@typescript-eslint/eslint-plugin": "^4.4.1",
"@typescript-eslint/parser": "^4.4.1",
"eslint": "^7.11.0",
"eslint-import-resolver-typescript": "^2.3.0",
"eslint-plugin-import": "^2.22.1",
"tsup": "^4.12.5",
"type-fest": "^0.18.0",
"typescript": "^4.0.3"
},
"dependencies": {
"oneline": "^1.0.3",
"serialize-error": "^2.1.0",
"serialize-error": "^8.1.0",
"tiny-uid": "^1.1.1",
"webextension-polyfill-ts": "^0.20.0"
}
Expand Down
2 changes: 1 addition & 1 deletion src/internal.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { JsonValue } from 'type-fest';
import { browser, Runtime } from 'webextension-polyfill-ts';
import * as serializeError from 'serialize-error';
import { serializeError } from 'serialize-error';
import oneline from 'oneline';
import uuid from 'tiny-uid';

Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es2018",
"module": "esnext",
"target": "esnext",
"outDir": "./dist",
"jsx": "react",
"sourceMap": true,
"declaration": true,
"esModuleInterop": true,
"moduleResolution": "node",
"declarationDir": "./dist"
},
"exclude": [
Expand Down