Skip to content

Commit

Permalink
fix: relative worker paths (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlwn123 authored Sep 20, 2024
1 parent 4f20b2f commit 38c9755
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/core-web/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import terser from '@rollup/plugin-terser'

export default [
{
input: { worker: 'src/worker.js', index: 'src/index.ts' },
input: { worker: 'src/worker/worker.js', index: 'src/index.ts' },
output: {
dir: 'dist',
format: 'esm',
Expand Down
2 changes: 1 addition & 1 deletion packages/core-web/src/FedimintWallet.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WorkerClient } from './transport/WorkerClient'
import { WorkerClient } from './worker/WorkerClient'
import {
BalanceService,
MintService,
Expand Down
2 changes: 1 addition & 1 deletion packages/core-web/src/services/BalanceService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WorkerClient } from '../transport'
import { WorkerClient } from '../worker'

export class BalanceService {
constructor(private client: WorkerClient) {}
Expand Down
2 changes: 1 addition & 1 deletion packages/core-web/src/services/FederationService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { JSONValue } from '../types/wallet'
import { WorkerClient } from '../transport'
import { WorkerClient } from '../worker'

export class FederationService {
constructor(private client: WorkerClient) {}
Expand Down
2 changes: 1 addition & 1 deletion packages/core-web/src/services/LightningService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WorkerClient } from '../transport'
import { WorkerClient } from '../worker'
import {
CreateBolt11Response,
GatewayInfo,
Expand Down
2 changes: 1 addition & 1 deletion packages/core-web/src/services/MintService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WorkerClient } from '../transport'
import { WorkerClient } from '../worker'
import { JSONObject, JSONValue } from '../types/wallet'

export class MintService {
Expand Down
2 changes: 1 addition & 1 deletion packages/core-web/src/services/RecoveryService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { JSONValue } from '../types/wallet'
import { WorkerClient } from '../transport'
import { WorkerClient } from '../worker'

export class RecoveryService {
constructor(private client: WorkerClient) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class WorkerClient {

constructor() {
// Must create the URL inside the constructor for vite
this.worker = new Worker(new URL('../worker.js', import.meta.url), {
this.worker = new Worker(new URL('./worker.js', import.meta.url), {
type: 'module',
})
this.worker.onmessage = this.handleWorkerMessage.bind(this)
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/core-web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"types": ["node"]
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules"]
"exclude": ["node_modules", "src/**/*.test.ts"]
}

0 comments on commit 38c9755

Please sign in to comment.