Category : rollupjs

i need rollup to bundle my sass files, like variables, mixins etc. index.scss contains @import "./scss/variables.scss"; and index.ts contains import "./index.scss"; export { Button } from "./components/Button"; however the bundle does NOT have any code from variables.scss, and if i use a variable inside of say Button.scss i get this error [!] (plugin postcss) Error: ..

Read more

I got an issue with my rollup + vue 2 setup, and get conflicting information online. My rollup config: import vue from ‘rollup-plugin-vue’; import postcss from ‘rollup-plugin-postcss’; import sass from ‘rollup-plugin-sass’; import image from ‘@rollup/plugin-image’; import babel from ‘rollup-plugin-babel’; import resolve from ‘rollup-plugin-node-resolve’; import commonjs from ‘rollup-plugin-commonjs’; const plugins = [ vue({ preprocessStyles: true, css: ..

Read more

I want to bundle the following code with the Rollup config below. However, when I open it in the browser, I get the following error. Uncaught ReferenceError: _asyncToGenerator is not defined I followed the instructions in the Babel documentation but it doesn’t work. App const task = () => new Promise((resolve) => resolve()); const main ..

Read more

I’m trying to use the rollup-plugin-copy plugin to copy a file that contains data fixtures from the src directory to the public directory for development purposes only. When rollup is bundling in the production environment, I don’t want this to happen. plugins: [ resolve({ mainFields: [‘browser’, ‘module’, ‘main’], preferBuiltins: true, browser: true, }), () => ..

Read more

I am currently trying to build an app with rollup that includes Lottie, which allows animations to be encapsulated in JSON files and directly rendered using Javascript. A default configuration of Terser chokes when trying to process this code, because it contains functions of the following form (example): var wiggle = function wiggle(freq, amp) { ..

Read more

I developed this library using Rollupjs to bundle it as UMD and ES modules. https://github.com/frantic0/sema-engine In the repo, I have a simple HTML file to test the library in which I import the library as a module. I am able to debug it as the library’s source map—which is generated as an independent .map file—seems ..

Read more

I want rollup to use the …esm.browser.js versions for import (because the generated result is supposed to be usable in the browser). From the documentation, my impression was that I can achieve this with the ‘browser’ field. But it does not work. package.json: { "name": "jgwc-vue-components", "version": "1.0.0", "main": "dist/jgwc-vue-components2.js", "module": "dist/jgwc-vue-components2.esm.js", "browser": { "vue-class-component": ..

Read more