Category "rollupjs"

How to import js module when Typescript declaration file is located in a separate directory?

Question: When I run npm run build with the configuration below, rollup.js is unable to resolve the dependency (import) and displays the following message below

Typescript const enum alternative

More and more modern Typescript transpilers have moved toward a strategy of per-module transpilation, which significantly increases build speed, but eliminates

Conditional compilation in rollup

How can I exclude some part of code in file (not the file itself but only few lines) from compiling into bundle? In C# it looks like #ifdef _DEBUG ... #else ...

Configuring Jest with Rollup and Typescript

I created an app within a monorepo (Lerna) using yarn workspace. The architecture of the app is as follow: my-monorepo ├── node_modules ├

How to load a Font from node_modules with Vite?

I'm trying to load a company font from a node_modules folder which only includes fonts and icons, it was working locally. At first, I thought it was because Vit

RollupJS generate only index.js

I'm having some trouble with RollupJS. I have one component library using typescript, react, AntDesign which using rollup. Here my rollup config: import babe

Deploying Svelte App to Heroku / Dokku fails because modules cannot be found

I am having problems deploying my svelte web3 App to my VPS running Dokku. The structure of the folder is as follows: root |-->svelte |--> ... I found s

How to resolve rollup build error when using emotion: 'default' is not exported by @emotion\memoize\dist\memoize.cjs.js

I'm trying to build a standardized react button component for our enterprise library. I want to be able to use @emotion/styled to generate the styled react comp

Rollup doesn't bundle all the files exported in my input src

I have a problem. I'm currently making a component library for react, it works perfectly in storybook. But when I do a npm rollup, or install my package from np

How to do cache busting in Rollup.js?

In my project, I need to do cache busting, since after a new deploy, the browser often only reloads the HTML but not the JS & CSS files. Currently, I am not

is it possible to use rollup for processing just css?

I know that Rollup is used to bundle .js files. But is it possible to use it just to process css? (css, scss, less, etc). What i mean is if i had for example in

Unresolved dependencies rollup

I'm doing import file from 'file.json in a Vue component, but have a challenge when I run npm run build to bundle it with Rollup. It throws this error below an

Rollup preserveModulesRoot not working as expected

I feel like the preserveModulesRoot option while using preserveModules does not work as it should. Let's say I have a src/index.ts and a bunch of src/components

How to substitute sources for browser bundle with Rollup?

Using rollup is it possible to replace a specific source by another source in a NPM package during a browser bundle? Note this source is dynamically imported vi

Rollup & React- How to separate component bundles?

I currently am trying to build a UI Library for React and I am having a little bit of trouble. Currently I am using typescript and rollup, and I am able to bund

How to include HTML partials using Vite?

Is it possible to include snippets of shared HTML using Vite (vanilla)? I'm looking for a way to have the HTML prerendered without injecting via JS. Something l