Attempt to use ts-loader
This commit is contained in:
parent
4bfb781eff
commit
9fe1d86a1c
@ -4,10 +4,10 @@ import { BigNumber, Contract } from 'ethers'
|
|||||||
import { poseidon } from '@tornado/circomlib'
|
import { poseidon } from '@tornado/circomlib'
|
||||||
import { decrypt } from 'eth-sig-util'
|
import { decrypt } from 'eth-sig-util'
|
||||||
|
|
||||||
import { IndexedDB } from './services/idb'
|
import { IndexedDB } from '../services/idb'
|
||||||
import { BatchEventsService } from './services/batch'
|
import { BatchEventsService } from '../services/events/batch'
|
||||||
import { getAllCommitments } from './services/graph'
|
import { getAllCommitments } from '../services/graph'
|
||||||
import { ExtendedProvider } from './services/provider'
|
import { ExtendedProvider } from '../services/provider'
|
||||||
import { POOL_CONTRACT, RPC_LIST, FALLBACK_RPC_LIST, workerEvents, numbers } from './services/constants'
|
import { POOL_CONTRACT, RPC_LIST, FALLBACK_RPC_LIST, workerEvents, numbers } from './services/constants'
|
||||||
import { sleep } from './services/utilities'
|
import { sleep } from './services/utilities'
|
||||||
import { poolAbi } from './services/pool'
|
import { poolAbi } from './services/pool'
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { isEmpty } from 'lodash'
|
import { isEmpty } from 'lodash'
|
||||||
import { BigNumber, Contract } from 'ethers'
|
import { BigNumber, Contract } from 'ethers'
|
||||||
|
|
||||||
import { IndexedDB } from './services/idb'
|
import { IndexedDB } from '../services/idb'
|
||||||
import { BatchEventsService } from './services/batch'
|
import { BatchEventsService } from '../services/events/batch'
|
||||||
import { getAllNullifiers } from './services/graph'
|
import { getAllNullifiers } from '../services/graph'
|
||||||
import { ExtendedProvider } from './services/provider'
|
import { ExtendedProvider } from '../services/provider'
|
||||||
import { POOL_CONTRACT, RPC_LIST, FALLBACK_RPC_LIST, workerEvents, numbers } from './services/constants'
|
import { POOL_CONTRACT, RPC_LIST, FALLBACK_RPC_LIST, workerEvents, numbers } from './services/constants'
|
||||||
import { sleep } from './services/utilities'
|
import { sleep } from './services/utilities'
|
||||||
import { poolAbi } from './services/pool'
|
import { poolAbi } from './services/pool'
|
||||||
|
64405
syncEvents.cjs
Normal file
64405
syncEvents.cjs
Normal file
File diff suppressed because one or more lines are too long
49
tsconfig.worker.json
Normal file
49
tsconfig.worker.json
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2018",
|
||||||
|
"module": "ESNext",
|
||||||
|
"lib": [
|
||||||
|
"ESNext",
|
||||||
|
"ESNext.AsyncIterable",
|
||||||
|
"DOM"
|
||||||
|
],
|
||||||
|
"importHelpers": true,
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"noImplicitAny": true,
|
||||||
|
"allowJs": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"checkJs": false,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"strictNullChecks": true,
|
||||||
|
"noImplicitThis": true,
|
||||||
|
"noImplicitReturns": true,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"strictFunctionTypes": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"noEmit": true,
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"~/*": [
|
||||||
|
"./*"
|
||||||
|
],
|
||||||
|
"@/*": [
|
||||||
|
"./*"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"types": [
|
||||||
|
"@nuxt/types",
|
||||||
|
"@types/node"
|
||||||
|
],
|
||||||
|
},
|
||||||
|
"include": ["**/*.ts", "types"],
|
||||||
|
"exclude": [
|
||||||
|
"node_modules",
|
||||||
|
".nuxt",
|
||||||
|
"dist"
|
||||||
|
]
|
||||||
|
}
|
@ -5,6 +5,23 @@ export default [
|
|||||||
{
|
{
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
entry: './assets/events.worker.js',
|
entry: './assets/events.worker.js',
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
test: /\.(tsx|ts)?$/,
|
||||||
|
exclude: /node_modules/,
|
||||||
|
use: {
|
||||||
|
loader: 'ts-loader',
|
||||||
|
options: {
|
||||||
|
configFile: 'tsconfig.worker.json'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
extensions: ['.tsx', '.ts', '.js'],
|
||||||
|
},
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve('static'),
|
path: path.resolve('static'),
|
||||||
filename: 'events.worker.js',
|
filename: 'events.worker.js',
|
||||||
@ -13,6 +30,23 @@ export default [
|
|||||||
{
|
{
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
entry: './assets/nullifier.worker.js',
|
entry: './assets/nullifier.worker.js',
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
test: /\.(tsx|ts)?$/,
|
||||||
|
exclude: /node_modules/,
|
||||||
|
use: {
|
||||||
|
loader: 'ts-loader',
|
||||||
|
options: {
|
||||||
|
configFile: 'tsconfig.worker.json'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
extensions: ['.tsx', '.ts', '.js'],
|
||||||
|
},
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve('static'),
|
path: path.resolve('static'),
|
||||||
filename: 'nullifier.worker.js',
|
filename: 'nullifier.worker.js',
|
||||||
|
Loading…
Reference in New Issue
Block a user