Skip to content

Commit

Permalink
try to fix playground
Browse files Browse the repository at this point in the history
  • Loading branch information
lisicky committed Oct 28, 2024
1 parent 60de86a commit 5efcf9b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions apps/playground/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const withMDX = require("@next/mdx")();
const CopyWebpackPlugin = require('copy-webpack-plugin');

/** @type {import('next').NextConfig} */
const nextConfig = {
Expand All @@ -8,6 +9,20 @@ const nextConfig = {
asyncWebAssembly: true,
layers: true,
};
config.plugins.push(
new CopyWebpackPlugin({
patterns: [
{
from: '../../node_modules/@sidan-lab/sidan-csl-rs-browser/*.wasm',
to: 'static/chunks/[name][ext]',
},
{
from: '../../node_modules/@sidan-lab/sidan-csl-rs-nodejs/*.wasm',
to: 'server/chunks/[name][ext]',
},
],
})
);
return config;
},
pageExtensions: ["js", "jsx", "mdx", "ts", "tsx"],
Expand Down
3 changes: 2 additions & 1 deletion apps/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"eslint": "^8.57.0",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.3",
"typescript": "^5.3.3"
"typescript": "^5.3.3",
"copy-webpack-plugin": "^12.0.2"
},
"prettier": "@meshsdk/configs/prettier"
}

0 comments on commit 5efcf9b

Please sign in to comment.