Closed yurenju closed 3 weeks ago
Any updates on this? Is there any quick way to solve this for now?
@nacho-villanueva, not from my side, but there is a workaround that you can use preview
or build
as a workaround, but development does not work.
I found a workaround for this.
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
// https://vitejs.dev/config/
export default defineConfig((env) => {
let alias = {};
if (env.mode == "development") {
alias = {
"ethr-did-resolver": path.resolve(
"./node_modules/ethr-did-resolver/src/index.ts"
),
};
}
return {
plugins: [react()],
resolve: {
alias,
},
};
});
this will manually map the package only for the development build.
:tada: This issue has been resolved in version 11.0.0-alpha.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 11.0.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Current Behavior
ethr-did-resolver does not work with vite bundler and throw error:
Expected Behavior
it should work both for webpack and vite, I actually cannot make it work on webpack, but it works on CRACO since veramo-react-app-tutorial use CRACO for example
Failure Information
Steps to Reproduce
please enter commands in below to reproduce it, or just clone https://github.com/yurenju/vite-ethr-did-resolver to reproduce it
then copy the example to counter.ts:
and execute
npm run dev
Environment Details
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Failure Logs/Screenshots
Alternatives you considered
CRACO seems work, reference to veramo-react-app-tutorial