Skip to content

Commit

Permalink
chore: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
immortal-tofu committed Oct 3, 2024
1 parent 26551d8 commit 60a3922
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 11 deletions.
28 changes: 20 additions & 8 deletions config/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { createRequire } from 'node:module';

import json from '@rollup/plugin-json';
import url from '@rollup/plugin-url';
import { wasm } from '@rollup/plugin-wasm';
import typescript from '@rollup/plugin-typescript';
import replace from '@rollup/plugin-replace';
Expand Down Expand Up @@ -34,14 +35,15 @@ const nodePlugins = [

const webPlugins = [
json(),
copy({
targets: [
// {
// src: './src/kms/web/*',
// dest: 'lib/kms/web',
// },
],
}),
// copy({
// targets: [
// {
// src: './node_modules/tfhe/snippets/wasm-bindgen-rayon-3e04391371ad0a8e/src/*',
// dest: 'lib/',
// },
// ],
// }),
url(),
nodePolyfills(),
replace({
preventAssignment: true,
Expand Down Expand Up @@ -74,6 +76,16 @@ export default [
},
plugins: [...webPlugins],
},
{
input:
'./node_modules/tfhe/snippets/wasm-bindgen-rayon-3e04391371ad0a8e/src/workerHelpers.worker.js',
output: {
file: 'lib/workerHelpers.worker.js',
name: 'fhevm',
format: 'es',
},
plugins: [...webPlugins],
},
{
input: 'src/node.ts',
output: {
Expand Down
3 changes: 0 additions & 3 deletions config/webpack.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ const web = {
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1,
}),
],
};

Expand Down
54 changes: 54 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-typescript": "^11.1.1",
"@rollup/plugin-url": "^8.0.2",
"@rollup/plugin-wasm": "^6.1.3",
"@types/jest": "^29.5.1",
"@types/node-fetch": "^2.6.11",
Expand Down

0 comments on commit 60a3922

Please sign in to comment.