Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document new API and deprecate old #592

Open
alanshaw opened this issue Nov 28, 2023 · 2 comments
Open

Document new API and deprecate old #592

alanshaw opened this issue Nov 28, 2023 · 2 comments

Comments

@alanshaw
Copy link
Member

In #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

@Honour-d-dev
Copy link

 ⨯ 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

@Honour-d-dev
Copy link

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,
    }),
  ],
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants