Open alanshaw opened 7 months ago
⨯ node_modules\@w3ui\react\build\esm\index.js (17:7) @ commonjsRequire
⨯ unhandledRejection: Error: Could not dynamically require "url". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.
at commonjsRequire (webpack-internal:///(ssr)/./node_modules/@w3ui/react/build/esm/index.js:40:11)
at __wbg_init (webpack-internal:///(ssr)/./node_modules/@w3ui/react/build/esm/index.js:18202:124)
at eval (webpack-internal:///(ssr)/./node_modules/@w3ui/react/build/esm/index.js:18236:21)
at eval (webpack-internal:///(ssr)/./node_modules/@w3ui/react/build/esm/index.js:47:9)
at eval (webpack-internal:///(ssr)/./node_modules/@w3ui/react/build/esm/index.js:48:7)
at eval (webpack-internal:///(ssr)/./node_modules/@w3ui/react/build/esm/index.js:29511:3)
code runs fine on the browser without errors after @rollup config but still throws on terminal and during build. this is with the new w3ui api
its also possible i didn't do the rollup configuration right, so perhaps an example on that would be appreciated my config
import commonjs from "@rollup/plugin-commonjs";
export default {
input: "src/index.js",
output: {
dir: "output",
format: "cjs",
},
plugins: [
commonjs({
dynamicRequireTargets: ["node_modules/@w3ui/*.js"],
ignoreDynamicRequires: true,
strictRequires: true,
}),
],
};
In https://github.com/web3-storage/w3ui/pull/591 we switched to a new simplier API with new packages. Due to time constraints we didn't document the new packages or deprecate the old packages yet (they still work but with older versions of w3up).
cc @travis