Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend marketplace #6

Merged
merged 12 commits into from
Jul 30, 2024
Merged
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = ["crates/cli", "crates/core"]
members = ["crates/cli", "crates/core", "crates/program_wasm"]
resolver = "2"

[workspace.package]
Expand Down
2 changes: 2 additions & 0 deletions askeladd-dvm-marketplace/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DEFAULT_NOSTR_USER_SK=9f...f4
NEXT_PUBLIC_DEFAULT_NOSTR_USER_SK=9f...f4 # We can generate Nostr private key for user after
2 changes: 2 additions & 0 deletions askeladd-dvm-marketplace/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ yarn-error.log*

# local env files
.env*.local
.env*.develop
.env

# vercel
.vercel
Expand Down
29 changes: 29 additions & 0 deletions askeladd-dvm-marketplace/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,43 @@
/** @type {import('next').NextConfig} */
const nextConfig = {

webpack: (config, { isServer }) => {
const wasmExtensionRegExp = /\.wasm$/;
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
net: false,
tls: false,
};
config.resolve.extensions.push(".wasm");
config.experiments = {
asyncWebAssembly: true,
syncWebAssembly: true,
layers: true // for using `import { ... } from 'rust-nostr/nostr-sdk'` syntax
};
}
config.resolve.extensions.push(".wasm");
// config.module.rules.forEach((rule) => {
// (rule.oneOf || []).forEach((oneOf) => {
// if (oneOf.type === "asset/resource") {
// oneOf.exclude.push(wasmExtensionRegExp);
// }
// });
// });
// // Add wasm-loader
// config.module.rules.push({
// test: /\.wasm$/,
// type: 'javascript/auto',
// use: {
// loader: 'wasm-loader',
// }
// });
config.experiments = {
asyncWebAssembly: true,
syncWebAssembly: true,
layers: true // for using `import { ... } from 'rust-nostr/nostr-sdk'` syntax
};
return config;
},
};
Expand Down
Loading