Skip to content

Commit

Permalink
fix(tsconfig): modify some tsconfig settings to get isolated configs …
Browse files Browse the repository at this point in the history
…for web/cjs/esm
  • Loading branch information
dtfiedler committed Apr 25, 2024
1 parent 881c54b commit 46b7acc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
6 changes: 2 additions & 4 deletions bundle.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { build } from 'esbuild';
import { polyfillNode } from 'esbuild-plugin-polyfill-node';

const bundle = () => {
const bundle = async () => {
console.log('Building web bundle esm.');
const result = build({
await build({
entryPoints: ['./src/web/index.ts'],
bundle: true,
platform: 'browser',
Expand All @@ -30,5 +30,3 @@ const bundle = () => {
};

bundle();

export { bundle };
1 change: 0 additions & 1 deletion tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"extends": "./tsconfig.json",
"exclude": ["src/web"],
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"target": "esnext",
"allowSyntheticDefaultImports": true,
"lib": ["esnext", "dom"],
"lib": ["esnext"],
"outDir": "./lib/esm",
"listEmittedFiles": false,
"listFiles": false,
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.web.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"extends": "./tsconfig.json",
"lib": ["esnext", "dom"],
"include": ["src/web", "src/common", "src/utils"],
"compilerOptions": {
"outDir": "./lib/web",
"moduleResolution": "bundler",
"paths": {
"arweave": ["./node_modules/arweave/node/index.js"]
}
Expand Down

0 comments on commit 46b7acc

Please sign in to comment.