1,201 questions
1
vote
0
answers
49
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 /...
0
votes
0
answers
36
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 ...
-1
votes
2
answers
256
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
...
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: "...
-1
votes
1
answer
245
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....
0
votes
0
answers
31
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 ...
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 ...
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 ...
-1
votes
1
answer
205
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: [
{
...
0
votes
0
answers
35
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 ...
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 ...
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:...
0
votes
0
answers
180
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 ...
0
votes
1
answer
89
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 ...
0
votes
1
answer
93
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.
...
1
vote
0
answers
153
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 ...
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 ...
0
votes
1
answer
646
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 ...
2
votes
0
answers
637
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 ...
4
votes
0
answers
181
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 '...
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.
...
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 ...
0
votes
1
answer
86
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 ...
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 ...
2
votes
1
answer
818
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 ...