rollup-plugin-peer-deps-external | Automatically externalize peerDependencies | Plugin library

 by   pmowrer JavaScript Version: 2.2.4 License: MIT

kandi X-RAY | rollup-plugin-peer-deps-external Summary

kandi X-RAY | rollup-plugin-peer-deps-external Summary

rollup-plugin-peer-deps-external is a JavaScript library typically used in Plugin applications. rollup-plugin-peer-deps-external has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can install using 'npm i rollup-plugin-peer-deps-external' or download it from GitHub, npm.

Automatically externalize peerDependencies in a rollup bundle.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              rollup-plugin-peer-deps-external has a low active ecosystem.
              It has 82 star(s) with 10 fork(s). There are 10 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 1 open issues and 9 have been closed. On average issues are closed in 73 days. There are 20 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of rollup-plugin-peer-deps-external is 2.2.4

            kandi-Quality Quality

              rollup-plugin-peer-deps-external has 0 bugs and 0 code smells.

            kandi-Security Security

              rollup-plugin-peer-deps-external has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              rollup-plugin-peer-deps-external code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              rollup-plugin-peer-deps-external is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              rollup-plugin-peer-deps-external releases are available to install and integrate.
              Deployable package is available in npm.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rollup-plugin-peer-deps-external
            Get all kandi verified functions for this library.

            rollup-plugin-peer-deps-external Key Features

            No Key Features are available at this moment for rollup-plugin-peer-deps-external.

            rollup-plugin-peer-deps-external Examples and Code Snippets

            No Code Snippets are available at this moment for rollup-plugin-peer-deps-external.

            Community Discussions

            QUESTION

            Published styled-components react library does not have access to user app ThemeProvider
            Asked 2021-May-04 at 13:57

            So i'm building a design system for this company and the component system is displayed correctly in the design system storybook. But when I import it in the consumer app I get the following error

            ...

            ANSWER

            Answered 2021-May-04 at 13:57

            I've had a similar issue when developing a component library using storybook and emotion/styled-components. The issue was that I was using the styled-components' ThemeProvider from the consumer app, as you did in your _app.js. The solution was to create and export a custom ThemeProvider on the component library, using the library's styled-component package, like so:

            Source https://stackoverflow.com/questions/66030059

            QUESTION

            Changing rollup-plugin-postcss generated CSS class names for only certain files
            Asked 2021-Apr-16 at 21:44

            I need to configure rollup-plugin-postcss to only modify the CSS class names of certain files. I know this is possible with WebPack but I can't figure out how to do it with Rollup. Ideally I would like to give a regular expression that describes what to do with CSS files that match that criteria.

            This is what my rollup.config.js looks like:

            ...

            ANSWER

            Answered 2021-Apr-16 at 21:43

            I kind of figured it out. I used rollup-plugin-postcss-modules instead of rollup-plugin-postcss. This is what my rollup.config.js ended up looking like:

            Source https://stackoverflow.com/questions/67057675

            QUESTION

            Can't import generated typings file create-react-app
            Asked 2021-Apr-05 at 15:26

            It's my first time creating a typescript react npm module, and I am trying to import one of the type definitions in my project that is using the new npm module. VSCode intellisense is able to find and suggest the one of the automatically generated .d.ts files, but the application fails to load it. What is going on?

            ...

            ANSWER

            Answered 2021-Apr-03 at 21:29

            I'm a bit surprised you're loading types from the types.d file direct and with a build path! I'd expect rather import { Type } from '@myorg/component-library.

            That's because as part of creating the package.json for a typescript-authored npm library you'd be defining a main property pointing to the place that exports all the Javascript properties and a types property pointing to the place that exports the typescript types you want.

            If that main entry point (because of your build process) is actually build/index.js and the corresponding types file is build/index.d.ts then you'd never directly reference the build folder or files when importing - pointing to the right path is dealt with by the bundling process.

            Take a look at a mainstream (but simple) typescript npm module like https://github.com/jamiebuilds/unstated-next/blob/master/package.json ( https://www.npmjs.com/package/unstated-next )

            You can see the main property pointing to the file which should export the javascript names https://github.com/jamiebuilds/unstated-next/blob/master/package.json#L6 and the types property pointing to the file which should export the types https://github.com/jamiebuilds/unstated-next/blob/master/package.json#L9 and these happen to be in the 'dist' folder but this is never referenced when importing it as per the docs at https://www.npmjs.com/package/unstated-next

            Source https://stackoverflow.com/questions/66926492

            QUESTION

            Uncaught Error: Cannot find module 'react/jsx-runtime'
            Asked 2021-Feb-01 at 01:07

            I am exploring making a component library using React and rollup, but finding that the app that is consuming the library is bundling it in the wrong order.

            This is causing the below error:

            ...

            ANSWER

            Answered 2021-Feb-01 at 01:07

            So my setup actually was working. There was somehow a glitch in the symlink. I as able to resolve by running yarn unlink and yarn link. The package is now bundling correctly.

            Source https://stackoverflow.com/questions/65913201

            QUESTION

            React + Antd + Rollup Component Library "Error: Invalid hook call. Hooks can only be called inside of the body of a function component"
            Asked 2020-Dec-11 at 23:06

            I'm currently building a UI library to simplify maintenance across multiple applications. These currently use Ant Design.

            All seemed to go fine... I added my peer dependencies in both package.json and rollup.config.js (via externals) and I was able to get Rollup to produce an es and cjs binary which successfully exports just my code.

            However, when I import either of these into my host application (Electron and/or React, already using antd without issue) I am receiving the following error:

            ...

            ANSWER

            Answered 2020-Dec-11 at 22:16

            If this issue happens while you're linking the local version of your library in your main project to speed up the development. It might be related to "duplicate version of React".

            https://reactjs.org/warnings/invalid-hook-call-warning.html

            This problem can also come up when you use npm link or an equivalent. In that case, your bundler might “see” two Reacts — one in application folder and one in your library folder. Assuming myapp and mylib are sibling folders, one possible fix is to run npm link ../myapp/node_modules/react from mylib. This should make the library use the application’s React copy.

            In short:

            • run npm link in /your-app/node_modules/react. This should make the React's global link.
            • run npm link react in /your-ui-library. This should make the library use the application’s React copy.

            Source https://stackoverflow.com/questions/65259040

            QUESTION

            Creating an NPM package with Styled-Components: Styled-Components TypeError: t.hasOwnProperty is not a function
            Asked 2020-Dec-09 at 00:17

            I'm creating an internal NPM package that contains the base layout for all of our ReactJS web applications. In this package, I am using styled-components for formatting the components, and rollup to build the package. Styled components is also used in the target application.

            Here are the config files:

            packages.json

            ...

            ANSWER

            Answered 2020-Dec-09 at 00:17

            So, after two weeks, it turns out that having an image in the theme was what was causing this. Changing the image from an import to a url reference fixed this problem.

            Source https://stackoverflow.com/questions/65042698

            QUESTION

            Rollup React Library Output Multiple Build Folders?
            Asked 2020-Dec-06 at 22:49

            I have created a React Library with rollup, however, I have a large number of components that get exported so the file size is relatively large.

            So in a project where I import the library doing the following;

            ...

            ANSWER

            Answered 2020-Jun-14 at 18:16

            You don't really need to do that if you use named exports and any modern bundler for building the app. When Rollup detects you are not using some export it will be removed due to tree-shaking.

            If you still want to do it pass an object with the different entries you want to the input option:

            Source https://stackoverflow.com/questions/62219096

            QUESTION

            TypeError: fiber is undefined (React-Konva + RollupJS)
            Asked 2020-Oct-25 at 04:02

            I am trying to use rollup to build a mini react component library of sorts, as soon as I add a react-konva component the errors appears, when I add the konva to the example I using to test the library it works fine leading me to assume its something with the way rollup handles konva. The only thing that I have seen on the github for react-konva that may link to this is: https://github.com/konvajs/react-konva/issues/504

            • My Rollup Config
            ...

            ANSWER

            Answered 2020-Oct-25 at 04:02

            Well I look stupid, I randomly decided to change from duckduckgo to google to look up the issue and got a few github links for it one being https://github.com/konvajs/react-konva/issues/189 which made me think to remove my react konva and konva and reinstall it to the latest version and it worked my react-konva was on 16.13 or something and when I upgraded ended up on 17.0.0 which worked

            Source https://stackoverflow.com/questions/64519916

            QUESTION

            How to configure Rollup and PostCSS to bundle LESS and CSS (Tailwind)
            Asked 2020-Oct-01 at 09:22

            I am putting together a started kit to bundle a React component library with Rollup. The library includes Antd which uses LESS, and Tailwind.

            I have an issue in my rollup.config.ts file:

            ...

            ANSWER

            Answered 2020-Oct-01 at 09:22

            You have to use the postcss plugin before the commonjs one, or it will try to interpret the contents of CSS files as JavaScript. Maybe it also needs to come before the resolve one but not sure about that.

            After making those changes you probably won't need to do anything for .less files since rollup-plugin-postcss already handles them.

            Edit: after looking at the repository, you didn't need to use the postcss plugin before the other ones, just omit the postcss extensions option or set it correctly (was missing a dot in front of css):

            Source https://stackoverflow.com/questions/64059355

            QUESTION

            export material ui themed package
            Asked 2020-Jul-25 at 03:41

            I want to create a new npm package where i can export all @material-ui/core components but themed my way. Currently using typescript and rollup, but failing. This is my code

            index.ts

            ...

            ANSWER

            Answered 2020-Jul-25 at 03:41

            after investigating a lil bit more, i found out that is not your bundlers error (nor webpack, parcel or rollup). To fix this issue, you just have to publish your build into npm and install it from there (not locally) and voila, it works. cheers

            Source https://stackoverflow.com/questions/63044962

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install rollup-plugin-peer-deps-external

            You can install using 'npm i rollup-plugin-peer-deps-external' or download it from GitHub, npm.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i rollup-plugin-peer-deps-external

          • CLONE
          • HTTPS

            https://github.com/pmowrer/rollup-plugin-peer-deps-external.git

          • CLI

            gh repo clone pmowrer/rollup-plugin-peer-deps-external

          • sshUrl

            git@github.com:pmowrer/rollup-plugin-peer-deps-external.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link