Skip to content

Commit

Permalink
Implement voting with Snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrila committed Oct 13, 2023
1 parent 0878e40 commit 724f06f
Show file tree
Hide file tree
Showing 20 changed files with 673 additions and 96 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ NEXT_PUBLIC_INFURA_IPFS_API_KEY=""
NEXT_PUBLIC_INFURA_IPFS_API_SECRET=""
# site preview links
NEXT_PUBLIC_SITE_URL="https://app.dev.fractalframework.xyz/"
# Shutter Public Key
NEXT_PUBLIC_SHUTTER_EON_PUBKEY=0x0e6493bbb4ee8b19aa9b70367685049ff01dc9382c46aed83f8bc07d2a5ba3e6030bd83b942c1fd3dff5b79bef3b40bf6b666e51e7f0be14ed62daaffad47435265f5c9403b1a801921981f7d8659a9bd91fe92fb1cf9afdb16178a532adfaf51a237103874bb03afafe9cab2118dae1be5f08a0a28bf488c1581e9db4bc23ca
34 changes: 34 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
class WasmChunksFixPlugin {
apply(compiler) {
compiler.hooks.thisCompilation.tap('WasmChunksFixPlugin', compilation => {
compilation.hooks.processAssets.tap({ name: 'WasmChunksFixPlugin' }, assets =>
Object.entries(assets).forEach(([pathname, source]) => {
if (!pathname.match(/\.wasm$/)) return;
compilation.deleteAsset(pathname);

const name = pathname.split('/')[1];
const info = compilation.assetsInfo.get(pathname);
compilation.emitAsset(name, source, info);
})
);
});
}
}

/** @type {import('next').NextConfig} */
module.exports = {
output: undefined,
webpack(config, { isServer, dev }) {
config.experiments = {
asyncWebAssembly: true,
layers: true,
};

config.resolve.fallback = {
fs: false,
};

if (!dev && isServer) {
config.output.webassemblyModuleFilename = 'chunks/[id].wasm';
config.plugins.push(new WasmChunksFixPlugin());
}

return config;
},
images: {
dangerouslyAllowSVG: true,
contentDispositionType: 'attachment',
Expand Down
Loading

0 comments on commit 724f06f

Please sign in to comment.