Category : rollup

I created a component library using vue-sfc-rollup, however, I met a problem when using a component from it in another project. details are in the link below: to add vue-lib component library I ran npm install –save @knowscount/vue-lib and then placed <InputBox /> & import InputBox from ‘@knowscount/vue-lib, registering the component, yet the page went ..

Read more

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

According to Bootstrap 5 official documentation, we can import pre-compiled js files from bootstrap/js/dist and build a custom bundle using (Webpack, rollup, …). https://getbootstrap.com/docs/5.0/getting-started/javascript/#individual-or-compiled And in the optimizing section in docs, they gave an example of how you can import js files. https://getbootstrap.com/docs/5.0/customize/optimize/#lean-javascript The problem: I created a file named bootstrap.js import ‘bootstrap/js/dist/tooltip’; and I ..

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 have this config: import ts from "@rollup/plugin-typescript"; import { uglify } from "rollup-plugin-uglify"; import obfuscator from "rollup-plugin-javascript-obfuscator"; export default { input: "src/index.ts", output: [ { file: "dist/bundle.js", format: "cjs", }, { file: "dist/ugly-bundle.js", format: "cjs", plugins: [uglify()], }, { file: "dist/obfuscate-bundle.js", format: "cjs", plugins: [obfuscator({ compact: true })], }, ], plugins: [ts()], }; And ..

Read more

I’m trying to create a gulp task that will use Rollup to compile JavaScript files for modern and legacy using environment variables. I’ve introduced plugin-node-resolve and plugin-commonjs for the legacy side of things, however whenever I run the script for legacy I get the following error: Message: Cannot read property ‘preserveSymlinks’ of undefined Details: code: ..

Read more