Skip to content

Commit

Permalink
Introduce lucid-evolution and wasm compatibility to the frontend (#64)
Browse files Browse the repository at this point in the history
* 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 <kathrynjeanelizabethstacy@gmail.com>
Co-authored-by: Jann Müller <j-mueller@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 15, 2025
1 parent 14b458d commit 62a1d48
Show file tree
Hide file tree
Showing 21 changed files with 9,462 additions and 3,083 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci-oci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ jobs:
# except the version with the `primary-key`, if it exists
purge-primary-key: never

# TODO: matrix build for two images (mock server and wst)
- name: Build image with nix
if: False
run: nix build --accept-flake-config .#containers.x86_64-linux.${{ matrix.image }}.copyTo
- name: Publish tagged image with podman
if: False
run: |
IMAGE_NAME=ghcr.io/${{github.repository_owner}}/${{ matrix.image }}:$IMAGE_TAG
./result/bin/copy-to oci-archive:oci.tar
Expand Down
65 changes: 64 additions & 1 deletion frontend/next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');


/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
// output: 'export',
serverExternalPackages: [
"@lucid-evolution/lucid",
],
async headers() {
return [
{
Expand All @@ -24,6 +29,64 @@ const nextConfig = {
},
];
},
async redirects() {
return [
{
source: '/',
destination: '/mint-authority',
permanent: true, // Use true for a 301 redirect, false for 302
},
];
},
experimental: {
esmExternals: true, // Ensure modern module support
},
webpack: (config, { isServer }) => {
// Ensure `resolve.plugins` exists
config.resolve.plugins = [
...(config.resolve.plugins || []), // Keep existing plugins
new TsconfigPathsPlugin({
configFile: './tsconfig.json', // Adjust the path to your tsconfig.json if necessary
}),
];

config.experiments = {
...config.experiments,
asyncWebAssembly: true, // Enable async WebAssembly
topLevelAwait: true,
layers: true
};
if (!isServer) {
config.output.environment = { ...config.output.environment, asyncFunction: true };
}

// Add fallback and resolve configurations for browser compatibility
config.resolve = {
...config.resolve,
extensions: ['.ts', '.tsx', '.js', '.mjs'],
fallback: {
https: require.resolve('https-browserify'),
http: require.resolve('stream-http'),
'get-port-please': false,
net: false,
fs: false,
os: false,
path: false,
events: require.resolve('events/'),
buffer: require.resolve('buffer/'),
stream: require.resolve('readable-stream'),
crypto: require.resolve('crypto-browserify'),
constants: require.resolve('constants-browserify'),
zlib: require.resolve('browserify-zlib'),
dns: false,
tls: false,
process: false,
child_process: false,
},
};

return config;
},
};

module.exports = nextConfig;
Expand Down
Empty file removed frontend/next.config.mjs
Empty file.
Loading

0 comments on commit 62a1d48

Please sign in to comment.