Skip to content

Commit 62a1d48

Browse files
colll78KJES4j-mueller
authored
Introduce lucid-evolution and wasm compatibility to the frontend (#64)
* fix cors and requestData errors * redeem mint wallet * add dynamic user info * add FE loading state * add lucid-evolution and wasm compatibility * submit endpoint * update ui to support lucid wallet loading * update lucid * recent changes * handle changes to profile switcher * add get wallet balance func * Fix hash * comment out output export * Disable container build --------- Co-authored-by: KJES4 <[email protected]> Co-authored-by: Jann Müller <[email protected]>
1 parent 14b458d commit 62a1d48

File tree

21 files changed

+9462
-3083
lines changed

21 files changed

+9462
-3083
lines changed

.github/workflows/ci-oci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ jobs:
7474
# except the version with the `primary-key`, if it exists
7575
purge-primary-key: never
7676

77-
# TODO: matrix build for two images (mock server and wst)
7877
- name: Build image with nix
78+
if: False
7979
run: nix build --accept-flake-config .#containers.x86_64-linux.${{ matrix.image }}.copyTo
8080
- name: Publish tagged image with podman
81+
if: False
8182
run: |
8283
IMAGE_NAME=ghcr.io/${{github.repository_owner}}/${{ matrix.image }}:$IMAGE_TAG
8384
./result/bin/copy-to oci-archive:oci.tar

frontend/next.config.js

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
2+
13

24
/** @type {import('next').NextConfig} */
35
const nextConfig = {
4-
output: 'export',
6+
// output: 'export',
7+
serverExternalPackages: [
8+
"@lucid-evolution/lucid",
9+
],
510
async headers() {
611
return [
712
{
@@ -24,6 +29,64 @@ const nextConfig = {
2429
},
2530
];
2631
},
32+
async redirects() {
33+
return [
34+
{
35+
source: '/',
36+
destination: '/mint-authority',
37+
permanent: true, // Use true for a 301 redirect, false for 302
38+
},
39+
];
40+
},
41+
experimental: {
42+
esmExternals: true, // Ensure modern module support
43+
},
44+
webpack: (config, { isServer }) => {
45+
// Ensure `resolve.plugins` exists
46+
config.resolve.plugins = [
47+
...(config.resolve.plugins || []), // Keep existing plugins
48+
new TsconfigPathsPlugin({
49+
configFile: './tsconfig.json', // Adjust the path to your tsconfig.json if necessary
50+
}),
51+
];
52+
53+
config.experiments = {
54+
...config.experiments,
55+
asyncWebAssembly: true, // Enable async WebAssembly
56+
topLevelAwait: true,
57+
layers: true
58+
};
59+
if (!isServer) {
60+
config.output.environment = { ...config.output.environment, asyncFunction: true };
61+
}
62+
63+
// Add fallback and resolve configurations for browser compatibility
64+
config.resolve = {
65+
...config.resolve,
66+
extensions: ['.ts', '.tsx', '.js', '.mjs'],
67+
fallback: {
68+
https: require.resolve('https-browserify'),
69+
http: require.resolve('stream-http'),
70+
'get-port-please': false,
71+
net: false,
72+
fs: false,
73+
os: false,
74+
path: false,
75+
events: require.resolve('events/'),
76+
buffer: require.resolve('buffer/'),
77+
stream: require.resolve('readable-stream'),
78+
crypto: require.resolve('crypto-browserify'),
79+
constants: require.resolve('constants-browserify'),
80+
zlib: require.resolve('browserify-zlib'),
81+
dns: false,
82+
tls: false,
83+
process: false,
84+
child_process: false,
85+
},
86+
};
87+
88+
return config;
89+
},
2790
};
2891

2992
module.exports = nextConfig;

frontend/next.config.mjs

Whitespace-only changes.

0 commit comments

Comments
 (0)