rollup-plugin-typescript2 | Rollup plugin for typescript with compiler errors | Plugin library
kandi X-RAY | rollup-plugin-typescript2 Summary
kandi X-RAY | rollup-plugin-typescript2 Summary
Rollup plugin for typescript with compiler errors.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rollup-plugin-typescript2
rollup-plugin-typescript2 Key Features
rollup-plugin-typescript2 Examples and Code Snippets
Community Discussions
Trending Discussions on rollup-plugin-typescript2
QUESTION
I am just desperate for an answer but there's a hope to find the answer here.
I Used following stuff:
...ANSWER
Answered 2022-Feb-25 at 07:07my colleague found this guide with the setup which is worked for me.
I leave it here for who can't find the same: https://dev.to/shubhadip/vue-3-component-library-270p
UPDATED: https://devsday.ru/blog/details/73660 - vite can build lib out-of-box. I haven't tried this way but suspect it works well. As always, I should look throw documentation carefully
QUESTION
I'm trying to create a package which exports some types, enums, consts and interfaces I use across multiple projects.
So I created a main.ts
and I put all the exports there, specify it in package.json: "main": "main.ts"
.
One of my exports needs some mapbox-gl
types. Obviously, I don't want my package to include mapbox-gl
types. So I did the following:
ANSWER
Answered 2022-Feb-13 at 16:09I was able to fix it by setting:
QUESTION
Rollup is compiling the module declarations in a separate area while javascript is kept in another area in npm package.
rollup.config.js
...ANSWER
Answered 2022-Jan-30 at 23:27Okay, after some deep digging.. The issue was related to not adding a package as an external dependency. When it wasn't included, rollup
would create a bundled node_modules
folder with the packages that weren't being added into the external
config and attempt to create a directory on top of that using that bundled javascript.
Output structure
QUESTION
I'm using the following rollup configuration:
...ANSWER
Answered 2022-Jan-04 at 19:02The issue didn't come from Rollup, it was the import in the Card component that was wrong. macro was there by mistake:
QUESTION
TypeScript comes with a useful feature called parameter properties for turning a constructor parameter into a class property with the same name and value. However, for some reason, when using TypeScript with Storybook and Rollup, constructor properties are not transpiled to class properties.
Example code:
my_class.ts
...ANSWER
Answered 2021-Dec-19 at 16:57This issue is caused by a known bug in Storybook. As a workaround, add the following code snippet to .storybook/main.js
:
QUESTION
I am trying to make a library/package from my component.
Tech-stack is: React, Typescript... and a bunch of other dependencies.
I am using Rollup and when I try to build the package I get the following error:
[!] Error: 'DisplayHint' is not exported by ../node_modules/@bestowinc/enroll-sdk-core/build/lib/question-common.js, imported by ../src/utils/answerTypeConversions.ts https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
Rollup:
...ANSWER
Answered 2021-Dec-02 at 07:54Looks like DisplayHint
is a TS type/interface, not an exported JS value.
Rollup per se is a bundler not a TS language analyzer. It cannot tell if a named export is a concrete JS value or merely a non-existing TS type, thus the reported error.
Rollup plugin order matters. To resolve this specific problem, just lift the typescript
plugin up in order, at least before babel
. TS plugin, if put to work first, will correctly erase TS type from JS code output.
Update
I know another trick, but it’s a workaround-ish one. The trick is to use import type
syntax to explicitly mark DisplayHint
as a TS type.
QUESTION
After I run npm start
This is my result is ...
...ANSWER
Answered 2021-Oct-01 at 17:24chnage the .js
file to
QUESTION
I am trying to run jest for a monorepo project maintained by lerna in the github actions.
...ANSWER
Answered 2021-Sep-16 at 05:20I have zero knowledge about this, but for a temporary answer, what worked for me (when I had the same error with jest) was adding,
- run: lerna bootstrap --no-ci
before running my npm test
command in my workflow config. Thus I ended up with a workflow like this:
QUESTION
Is it possible to have Material UI as peerDependency but keep its types as DevDependency?
I am building a component library using React + Typescript and the components are based on Material UI library, with Rollup as module bundler.
Here is an example of my IInputProps
type extending Material UI TextFieldProps
type.
ANSWER
Answered 2021-Jul-29 at 18:25If you expect to use an "external" @material-ui/core
(i.e. not part of the rollup), you should specify it as such.
Rollup actually has documentation on peer dependencies, which does specify to use externals
, for example with lodash
:
QUESTION
I run tsc --noemit
to ensure the are no type errors in the codebase. Unfortunately, it does not seem to check .svelte files.
Is there a way to make it work? I can see the type errors in .svelte files open in VS Code, so I think it has to be possible somehow with existing tooling.
Also I'm using the official @rollup/plugin-typescript I'm aware there is also rollup-plugin-typescript2 which checks types on build and may be an alternative solution, but I prefer to not enforce types on build and check types separately as I currently do.
...ANSWER
Answered 2021-Jul-16 at 07:29Use svelte-check
for this: https://www.npmjs.com/package/svelte-check
tsc --noemit
only knows about TypeScript files, not Svelte files. svelte-check
fills that gap and is able to check both TS and Svelte files.
When using it with TypeScript the recommended way to run it is: svelte-check --tsconfig ./path/to/your/tsconfig.json
. Assuming your tsconfig.json
is in your project root and you run that from the root, do svelte-check --tsconfig ./tsconfig.json
. It's advised to install svelte-check
locally, so you can add a script
to your package.json
with the mentioned command.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rollup-plugin-typescript2
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page