Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Filter by
Sorted by
Tagged with
1 vote
0 answers
45 views

Stop Rollupjs embedding absolute path inside js dist map file

I'm trying to update my GitHub action to use latest version of "base" action. All is looking fine but one PR check fails on checking if /dist directory was updated. It finds some changes in /...
piotrekkr's user avatar
  • 3,346
0 votes
0 answers
39 views

Sass + PurgeCSS + SvelteKit: properly hash filenames

I have some code using SvelteKit for JS, Sass (with Bootstrap) for CSS, optimized with PurgeCSS, and compiled with Vite. Here my vite.config.js: import { sveltekit } from '@sveltejs/kit/vite'; import {...
madbob's user avatar
  • 660
0 votes
0 answers
35 views

Import Alias with Vite not Resolving

I can not seem to figurate out how to get "@/" to resolve to "src". What am I doing wrong? [vite] Internal server error: Failed to resolve import "@/components/Name" from ...
Romuloux's user avatar
  • 1,222
0 votes
0 answers
49 views

Failing to export React (the library itself) as a esm module using Rollup

I am building a frontend with no buildstep using buildless react. I previously loaded react from a cdn similar to this: import React from "https://esm.sh/react" But I prefer to install ...
Stuurpiek's user avatar
-1 votes
2 answers
252 views

Vitest : cannot find package 'rollup'

While trying to execute unit tests with Vitest through Yarn in my Angular app I have an error about 'rollup' package : yarn run test [INFO] failed to load config from xxx\angular-test\vitest.config.ts ...
Benjamin C's user avatar
1 vote
1 answer
615 views

Installing Scripts into Nuxtjs 3 + Tailwind project introducing errors

I have a Nuxtjs project using Tailwind CSS that was working locally when build with yarn dev until today when I installed Nuxt Scripts in an attempt to get YouTube embeds working per the documentation ...
d-fws's user avatar
  • 91
0 votes
1 answer
70 views

rollup not taking care of all the dependent code | code missing in bundle

I'm trying to build a package, and for that I using rollup const config: RollupOptions[] = [ { input: "./index.ts", output: [ { dir: "...
Maifee Ul Asad's user avatar
0 votes
0 answers
22 views

RollupJs, PostCSS, SCSS Modules, Bootstrap being created in Styles.css at end of file, overriding css

I am using Rollup, PostCSS, Bootstap, Sass and React to bundle a component that relies on Bootstrap css. I write my component files but the output of Rollup has the following: My Rollup Config is: ...
Romuloux's user avatar
  • 1,222
-1 votes
1 answer
242 views

Output or log the vite rollup configuration?

When we create a vite project running npm run build will create the rollup javascript bundle. However the command npm init vite@latest that we used to scaffold out the project does not create a rollup....
Ole's user avatar
  • 48.2k
1 vote
0 answers
75 views

@rollup/plugin-typescript TS2307: Cannot find module '../xxx/HelloWorld.svelte' or its corresponding type declarations

TS FILE import App from "../xxx/HelloWorld.svelte"; const app = new App({ target: document.body, }); export default app; TSCONFIG.JSON { "extends": "@tsconfig/svelte/...
Henry Lodge's user avatar
0 votes
0 answers
30 views

Bundling Sass modules in React Component Package with Rollup

I'm working on packaging up a React component. I'm used to using CSS modules with sass (EG like Next.js). -src --components ---HelloWorld ----index.js ----hello-world.module.scss HelloWorld import ...
Romuloux's user avatar
  • 1,222
0 votes
0 answers
84 views

Vite and Craft — using 'public' as web root?

I am testing out Vite running as a build tool with Craft CMS (5) Using this useful plugin and following this CraftQuest course, I got to a working setup for build and dev scripts with 'web' as the ...
dezbat's user avatar
  • 3
1 vote
0 answers
60 views

How to enable HMR for a private React component library during development?

I’m currently developing a React component library that’s built with Rollup and released as a private npm package. This library is used across multiple applications. The issue I’m facing is that ...
nav's user avatar
  • 11
0 votes
0 answers
40 views

Recognizing custom loaders in Rollupjs

My team develops web clients in javascript. Historically, we have used Requirejs, but we are considering starting to migrate to es6 modules, and I am looking into Rollupjs to bundle the end product. ...
Tim Schommer's user avatar
0 votes
1 answer
47 views

How to use puppeteer in streamdeck sdk?

I want to create a streamdeck plugin using Streamdeck SDK. I created the example counter project and it works fine on Windows 11, node 23.8, Streamdeck 6.8.1. The project is written in typescript and ...
k0pernikus's user avatar
  • 67.6k
0 votes
0 answers
75 views

Rollup - EntryFileNames

Does anyone know how to build out a component library with file names like this toggle.component.ts etc... it seems very difficult trying to get the compiler to work with the .component ending. ...
Jordan Davis's user avatar
-1 votes
1 answer
200 views

Rollup + TypeScript AST Compilation Error

Trying to build a module with rollup + TypeScript and seeing some issues I cannot understand. My general rollup config looks like: export default { input: ['src/index.ts'], output: [ { ...
Joseph's user avatar
  • 539
1 vote
1 answer
881 views

How to Exclude node_modules and _virtual from dist/ When Building a vite Package for NPM?

I'm working on a monorepo project using pnpm, Turborepo, and Vite to manage multiple packages. One of my packages (@myorg/ui) generates a dist/ folder during the build process, but the build includes ...
Zaraki's user avatar
  • 29
0 votes
0 answers
34 views

Rollup nested exports for a private package

I have a private package @company/some-package I am unable to implement nested exports here. For example: @company/some-package/react @company/some-package/vue @company/some-package/vanilla Exactly ...
Rohan Gupta's user avatar
0 votes
0 answers
80 views

How to load vuetify/lib from CDN to achieve minimal sized app

I'm serving a website from a $1 ESP32 which has very little free flash so I need to make it as tiny as possible. Loading all of my packages from a CDN is the best way to achieve this. My site is also ...
Jon Smirl's user avatar
  • 377
0 votes
0 answers
69 views

Issue: slots Field in Typings for Svelte Component Testing

I am building a Svelte component library for my project and have run into several issues, particularly when trying to test components with slots. Here's the error I'm facing: Object literal may only ...
Józef Podlecki's user avatar
1 vote
1 answer
250 views

How to prevent Rollup from adding `$1` suffix to names?

I don't see how the answer to this question, @rollup/plugin-inject, solves my problem. So I'm asking a new question. Rollup is appending a $1 suffix to four names that my rolled-up module exports. My ...
Sideways S's user avatar
0 votes
1 answer
156 views

Rollup says my const names are global, renames them with $1 suffix

I see this Q&A here, but that's for an obvious global named Promise. I can find Promise in the MDN docs easily enough. But Rollup is renaming 4 of my consts that I don't find anywhere in any docs:...
Sideways S's user avatar
1 vote
0 answers
77 views

@rollup/plugin-html how to output the index.html file in the same directory as main.js

I have the following rollup config: import { defineConfig } from "rollup"; import multiInput from "rollup-plugin-multi-input"; import typescript from "rollup-plugin-...
Ethan's user avatar
  • 1,858
0 votes
0 answers
179 views

How to only minify, not compile, with SWC?

What is the option, or are the options, for SWC in order not to compile? I only want to use the minifier. I'm bundling with Rollup and I came across this plugin, rollup-plugin-swc-minify, but it sets ...
Sideways S's user avatar
1 vote
0 answers
441 views

Why does Vite sometimes replace my CSS imports with /* empty css */?

I'm developing a library of React components that uses Vite to build, and I've run into a strange problem. Normally, when I build, each .ts(x) file that references an scss file appears in the output ...
Ajm Iam's user avatar
  • 161
0 votes
1 answer
88 views

plugin rollup-plugin-sass: Error: Can't find stylesheet to import

I have an issue with the @carbon/theme and the rollup-plugin-saas plugin. [!] (plugin rollup-plugin-sass) Error: Can't find stylesheet to import. ╷ 6 │ @use '@carbon/themes'; It looks like the ...
Cyril's user avatar
  • 152
0 votes
0 answers
149 views

How to "run code through Rollup first, then pass it to Babel"?

To quote the top of the readme for @rollup/plugin-babel: If you're using Babel to transpile your ES6/7 code and Rollup to generate a standalone bundle, you have a couple of options: run the code ...
Sideways S's user avatar
0 votes
1 answer
91 views

Why Preact should be in prod dependency in Grid.js?

I've been reviewing some discussions, such as this one, which suggest that React should typically be placed as a prod dependency. However, I'm uncertain if the same consideration applies to Preact. ...
DonHunt7382's user avatar
2 votes
0 answers
212 views

Vite build issue, appears to be an out-of-order bundle

This is a strange one, and I'm hoping someone can at least point us in the right direction. We're converting a pretty large, fairly legacy ejected CRA app to vite. We've come pretty far, have it ...
CJ Thompson's user avatar
  • 2,879
1 vote
0 answers
152 views

How can I make rollup dump the problematic code?

I'm getting this error from Rollup (via Vite) vite v5.3.5 building for production... src/foo.tsx (2:0): A comment "/*#__NO_SIDE_EFFECTS__*/" in "src/foo.tsx" contains an ...
Aron Griffis's user avatar
  • 1,749
1 vote
0 answers
101 views

Semantic error TS2786: 'Popover' cannot be used as a JSX component

The project was created with tsdx, rollup and storybook A popover component was created using the react-tiny-popover library, it works correctly when running storybook, when running the tsdx build it ...
William Gabriel's user avatar
0 votes
1 answer
125 views

How to replace code before transpiling TypeScript code using Rollup. (How to transpile TypeScript code with Private Class Fields to ES5.)

I wont to do I want to transpile TypeScript code with Private Class Fields to ES5 like when using TypeScript's private identifier. (I give up one or the other, it will be resolved soon. But I don't ...
sflow's user avatar
  • 1
1 vote
0 answers
154 views

How to resolve "ERR_REQUIRE_ESM" for ESM dependencies when bundling a Node.js API with Rollup to CommonJS?

I'm working on bundling a Node.js API written with ES module (import/export) syntax and targeting CommonJS (CJS) as the output format using Rollup. However, after bundling the app and trying to start ...
octavemirbeau's user avatar
0 votes
1 answer
640 views

Vite build for a custom React library: module [...] was resolved to [...] but --jsx is not set

I'm working on a monorepo and I'm trying to create a package that would be a React ui-kit library. For now, I've been trying to export a custom button component and building the ESM et CJS modules ...
Mathieu Rousseau's user avatar
1 vote
0 answers
195 views

Using rollup with typescript and highlight.js

I'm trying to use rollup to build a bundle containing highlight.js. This is the starter project I'm using to build the bundle. If we clone it and run: git clone [email protected]:fireflysemantics/fs-lit-...
Ole's user avatar
  • 48.2k
2 votes
0 answers
634 views

[ERR_REQUIRE_ESM]: require() of ES Module ... is not supported

Project setup Electron app using electron-builder, which uses vite as build system. The build system is still almost identical to the template. TypeScript, with the .ts file extension ESM and import ...
Ben Bucksch's user avatar
2 votes
0 answers
296 views

Understanding Svelte final library size

EDIT (findings): I tried again after removing all references to Inertia, and only imported my example page in main.js (no other pages), and the result is the same: this example page component still ...
Aghyul Kyoku's user avatar
  • 1,058
4 votes
0 answers
180 views

viteJS, how to 'reproduce' Auto Code Splitting based on dynamic imports with manualChunks?

I use ViteJS integrated with PHP as a backend. I would like to 'separate' EditorJS from the main asset file. I build it, even though I'm not using EditorJS directly. However, when I try to use '...
Potivier's user avatar
0 votes
0 answers
81 views

Does this rollup script build a correct types.d.ts file, given that when the NPM package is imported it returns an error?

I'm trying to package a React component, written in Typescript, to release it open-source on NPM. This is the repo, which contains all files related to the project: https://github.com/lightenna/react-...
stanhope's user avatar
  • 386
1 vote
1 answer
2k views

Why am I getting this Storybook import error with RollupJS?

I have a turborepo with a react component library which I publish to NPM. Call it @myscope/react — it's bundled with CSS using RollupJS. And turbo has some good docs on publishing local packages here. ...
thomasmost's user avatar
  • 1,080
0 votes
1 answer
433 views

Rollup hangs on build

I have the follwing rollup config: // @ts-check import multiInput from "rollup-plugin-multi-input"; import typeScript from "rollup-plugin-typescript2"; export default [ { ...
Ethan's user avatar
  • 1,858
0 votes
1 answer
70 views

Rollup and babel does not transpile cssprop to styled component

I'm developing a React component library for npm. The tech stack includes: React TypeScript styled-components I'm using Babel and Rollup for the build process. My issue is that I want to use the css ...
Tottzi's user avatar
  • 41
1 vote
0 answers
256 views

Rollup: Could not resolve component from "src/index.ts"

I am trying to create my own npm package for a react component. I am getting the following error: Here is the project structure that I am using Here's my index.ts file import LeetcodeCalendar from &...
Karan Gaur's user avatar
0 votes
1 answer
85 views

How to import global variables in webpack or rollup project

I want to create a module for CMS using Rollup or webpack. I have a script tag that contains a few variables which I need to use in my webpack module, but I can't include them directly because these ...
Aimon Z.'s user avatar
0 votes
0 answers
113 views

Passing In Tailwindcss Classes to Component Library Not Working

So, I am building a React component library (like the world needs another one) and an app on top of it. When I pass in Tailwind classes to the components from the app, the passed classes don't get ...
Collin Lucke's user avatar
8 votes
1 answer
5k views

How to import json files in node v22

i was configuring a rollup.config.mjs file and this is how i used to import json files import packageJson from "./package.json" assert { type: "json" }; as far i have tested it ...
MUHAMMAD Asim's user avatar
1 vote
0 answers
277 views

Account for dynamic require in Rollup

I'm trying to build a project, but I have a problem. This is the structure of my project: . ├── deps │ ├── deps.js │ └── package.json └── module1 ├── mod1.js ├── package.json ├── ...
madou kone's user avatar
2 votes
1 answer
817 views

JSX element type '<Component>' does not have any construct or call signatures error AND MORE

I've been beating my head against a wall for days, so I'm throwing myself on the mercy of people who are smarter than me. (Sorry for the length... I'm trying to be thorough) I'm currently working a ...
Collin Lucke's user avatar
-1 votes
1 answer
421 views

Merge a split chunk back into the entrypoint

I have a module with a good handful of chunks A, B, C, and D, all of which rely on a shared utilities file which Rollup separately chunks. Because this utilities file is only a couple of Kb, and ...
Devildude4427's user avatar

1
2 3 4 5
25