Next-generation ES module bundler

Related tags

Bundlers rollup
Overview

Rollup

npm version install size code coverage backers sponsors license dependency status Join the chat at https://is.gd/rollup_chat

Overview

Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application. It uses the standardized ES module format for code, instead of previous idiosyncratic solutions such as CommonJS and AMD. ES modules let you freely and seamlessly combine the most useful individual functions from your favorite libraries. Rollup can optimize ES modules for faster native loading in modern browsers, or output a legacy module format allowing ES module workflows today.

Quick Start Guide

Install with npm install --global rollup. Rollup can be used either through a command line interface with an optional configuration file, or else through its JavaScript API. Run rollup --help to see the available options and parameters. The starter project templates, rollup-starter-lib and rollup-starter-app, demonstrate common configuration options, and more detailed instructions are available throughout the user guide.

Commands

These commands assume the entry point to your application is named main.js, and that you'd like all imports compiled into a single file named bundle.js.

For browsers:

# compile to a <script> containing a self-executing function
rollup main.js --format iife --name "myBundle" --file bundle.js

For Node.js:

# compile to a CommonJS module
rollup main.js --format cjs --file bundle.js

For both browsers and Node.js:

# UMD format requires a bundle name
rollup main.js --format umd --name "myBundle" --file bundle.js

Why

Developing software is usually easier if you break your project into smaller separate pieces, since that often removes unexpected interactions and dramatically reduces the complexity of the problems you'll need to solve, and simply writing smaller projects in the first place isn't necessarily the answer. Unfortunately, JavaScript has not historically included this capability as a core feature in the language.

This finally changed with ES modules support in JavaScript, which provides a syntax for importing and exporting functions and data so they can be shared between separate scripts. Most browsers and Node.js support ES modules. However, Node.js releases before 12.17 support ES modules only behind the --experimental-modules flag, and older browsers like Internet Explorer do not support ES modules at all. Rollup allows you to write your code using ES modules, and run your application even in environments that do not support ES modules natively. For environments that support them, Rollup can output optimized ES modules; for environments that don't, Rollup can compile your code to other formats such as CommonJS modules, AMD modules, and IIFE-style scripts. This means that you get to write future-proof code, and you also get the tremendous benefits of...

Tree Shaking

In addition to enabling the use of ES modules, Rollup also statically analyzes and optimizes the code you are importing, and will exclude anything that isn't actually used. This allows you to build on top of existing tools and modules without adding extra dependencies or bloating the size of your project.

For example, with CommonJS, the entire tool or library must be imported.

// import the entire utils object with CommonJS
var utils = require( 'utils' );
var query = 'Rollup';
// use the ajax method of the utils object
utils.ajax( 'https://api.example.com?search=' + query ).then( handleResponse );

But with ES modules, instead of importing the whole utils object, we can just import the one ajax function we need:

// import the ajax function with an ES import statement
import { ajax } from 'utils';
var query = 'Rollup';
// call the ajax function
ajax( 'https://api.example.com?search=' + query ).then( handleResponse );

Because Rollup includes the bare minimum, it results in lighter, faster, and less complicated libraries and applications. Since this approach is based on explicit import and export statements, it is vastly more effective than simply running an automated minifier to detect unused variables in the compiled output code.

Compatibility

Importing CommonJS

Rollup can import existing CommonJS modules through a plugin.

Publishing ES Modules

To make sure your ES modules are immediately usable by tools that work with CommonJS such as Node.js and webpack, you can use Rollup to compile to UMD or CommonJS format, and then point to that compiled version with the main property in your package.json file. If your package.json file also has a module field, ES-module-aware tools like Rollup and webpack will import the ES module version directly.

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

License

MIT

Comments
  • Avoid lazy parsing by adding parens around factory

    Avoid lazy parsing by adding parens around factory

    Most javascript engines do a lazy parsing optimization. For example if they see:

    function X() {...}

    They won't parse the contents of X until it is executed. However they often have to read the contents of X so that they can see if X uses any variables from the outer scope. Thus X ends up getting parsed twice.

    Realizing that often one immediately executes a function, browser have optimized statements of the form:

    (function X() {...})()

    So that X is not parsed lazily. Traditionally this optimization looks for an open paren before the function. For example, here's the optimization in v8:

    https://github.com/v8/v8/blob/203391bcc0e970d3cae27ba99afd337c1c5f6d42/src/parsing/parser.cc#L4256

    Since the factory is immediately executed (at least in the commonJS and global export case), this change avoids the double parsing that comes with parsing the function lazily.

    c¹ ⋅ discussion 
    opened by bmaurer 65
  • Code splitting

    Code splitting

    Previously: #120.

    Probably not going to happen any time soon, but at some point it would be nice to add support for code-splitting, i.e. finding the common dependencies of a.js and b.js so that you can do this sort of thing...

    <!-- a.html -->
    <script src='shared.js'></script>
    <script src='a.js'></script>
    
    <!-- b.html -->
    <script src='shared.js'></script>
    <script src='b.js'></script>
    

    ...and let visitors to b.html who have already been to a.html use a cached copy of shared.js (mutatis mutandis for client-side routing situations with an asynchronous module loader).

    First hard question is what the API looks like – my initial thought is that if you specify x entry points you should get x+1 bundles back, where the +1 is the shared code. Very easy to grok and probably meets most use cases, but not as flexible as some other approaches.

    Anyway I'll just leave this here for now.

    t³ ✨ enhancement 
    opened by Rich-Harris 65
  • Tree shaking not work when static method in class was used

    Tree shaking not work when static method in class was used

    • Link to Reproduce https://rollupjs.org/repl/?version=2.41.0&shareable=JTdCJTIybW9kdWxlcyUyMiUzQSU1QiU3QiUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMiUyRiolMjBUUkVFLVNIQUtJTkclMjAqJTJGJTVDbmV4cG9ydCUyMCU3QiUyMHRlc3QlMjAlN0QlMjBmcm9tJTIwJy4lMkZtb2R1bGUuanMnJTNCJTVDbiUyMiUyQyUyMmlzRW50cnklMjIlM0F0cnVlJTdEJTJDJTdCJTIybmFtZSUyMiUzQSUyMm1vZHVsZS5qcyUyMiUyQyUyMmNvZGUlMjIlM0ElMjJleHBvcnQlMjAlN0IlMjBGaWJlclRhc2tRdWV1ZSUyMCU3RCUyMGZyb20lMjAnLiUyRm1vZHVsZTIuanMnJTNCJTVDbmV4cG9ydCUyMCU3QiUyMHRlc3QlMjAlN0QlMjBmcm9tJTIwJy4lMkZtb2R1bGUzJyUzQiUyMiUyQyUyMmlzRW50cnklMjIlM0FmYWxzZSU3RCUyQyU3QiUyMm5hbWUlMjIlM0ElMjJtb2R1bGUyLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMnZhciUyMEZpYmVyVGFza1F1ZXVlJTIwJTNEJTIwKGZ1bmN0aW9uJTIwKCklMjAlN0IlNUNuJTIwJTIwJTIwJTIwZnVuY3Rpb24lMjBGaWJ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M0FudWxsJTdE

    Expected Behavior

    only have

    function test() {
    	return 'a';
    }
    
    export { test };
    

    Actual Behavior

    not only test function but also class

    if static method is replaced with instance method(or if static method in class was not used), it works right. Anybody knows why?

    opened by QiuZhiFeng97 51
  • Integration with Angular2 / TypeScript

    Integration with Angular2 / TypeScript

    Rollup seems like a dream bundler for ng2 apps, but it is unclear how it can be integrated with typescript codebases.

    What is the recommended way to rollup a typescript app, which uses es6 imports, and which depends on ng2 (which is also written in typescript and uses es6 imports exclusively)?

    c⁵ ⋅ question 
    opened by flyingmutant 46
  • Update to Chokidar v3 and bundle it as the default

    Update to Chokidar v3 and bundle it as the default

    I suggest to update to chokidar v3.

    Chokidar v3 incorporates a lot of improvements. We've decreased RAM consumption on large directories by a huge amount; and reduced dependency count by a factor of 13. All releases are signed now. See my blog post: Chokidar 3: How to save 32TB of traffic every week with one NPM package

    Chokidar v3 requires nodejs 8 and higher. Is it cool with Rollup?

    t³ ✨ enhancement s² 🔥🔥 important 
    opened by paulmillr 44
  • painful to get started

    painful to get started

    This project needs some better tutorials or examples. Here's my use case:

    1. I have code written in ES2015; I am using Babel to transpile
    2. I am also using npm dependencies
    3. These dependencies (mainly) use CommonJS instead of ES2015 modules
    4. This is a test runner with a programmatic API
    5. The resulting build(s) must be runnable in Node.js, a browser, and a CLI context

    I've discovered the Babel plugin, the NPM plugin, and the CommonJS plugin. It's unclear:

    1. In what order the plugins are supposed to run
    2. If order actually matters (though I'm pretty sure it does)
    3. Why the CommonJS plugin and NPM plugin are separated at all
    4. How to configure the Babel plugin to work with the above two plugins
    5. Why the Babel plugin is necessary
    6. Where Babel's responsibilities end and Rollup's begin--don't you need Babel to use import statements anyway?
    7. If/when Browserify or Webpack is necessary
    8. How to configure Karma to make my tests run in a browser
    9. How to explain to my users, in a README, how to include my library given a matrix of potential configurations (Node.js, browser, Babel, no-Babel, Rollup, etc)
    10. When to use a config file or when and how to use a build script (import rollup from 'rollup')

    I'm here asking these questions, there's probably 5 other people who had the same ones and didn't post an issue. Surely I'd like my questions addressed, but the real need is more documentation.

    Thanks!

    c¹ ⋅ discussion x¹ ⋅ abandoned 
    opened by boneskull 44
  • Improve circular dependency execution order

    Improve circular dependency execution order

    This PR contains:

    • [x] bugfix
    • [x] feature
    • [ ] refactor
    • [ ] documentation
    • [ ] other

    Are tests included?

    • [x] yes (bugfixes and features will not be merged without tests)
    • [ ] no

    Breaking Changes?

    • [ ] yes (breaking changes will not be merged unless absolutely necessary)
    • [x] no

    List any relevant issue numbers: #3834

    Description

    As #3834 showed, our current way of sorting dependencies in chunks completely messes up execution order if there are circular dependencies between chunks, which can happen when preserving modules.

    Before, we just sorted dependencies by their execution order. This PR instead changes the logic so that the order of dependencies is preserved from the modules. If we skip dependencies because they have no side-effects, the algorithm crawls transitive dependencies in the same order as regular dependency execution would happen to look for transitive side-effect dependencies instead.

    When merging module dependencies into chunks, the process now has two parts

    • first we start with the last module in the chunk, get the dependencies of that module. If a dependency is part of the chunk, we replace it with the dependencies of THAT module recursively. This process creates a dependency block
    • then we move on to the second to last module in the chunk, iterating backwards over the modules. If a module has already been handled as it was a dependency of a previous module it is skipped, otherwise a new dependency block is created
    • last we add all dependency blocks as dependencies to the chunk, this time in regular order, though

    This new algorithm will produce better execution order when

    • preserving modules
    • only chunks are created where all modules in the chunk would be executed top to bottom before bundling

    The second is not enforced yet, though. This will be a larger feature to add sometime in the future.

    Unfortunately, the execution order is not perfect when preserving modules as import shortening will still introduce new imports into modules/chunks that can trigger a cycle to be executed in a non-natural order. For this case, there has been a warning added. The infrastructure introduced to generate this warning can serve as a basis to fix this issue at least for ESM, CommonJS and possibly SystemJS in the future. AMD output cannot be made to support this easily as it does not have a dedicated concept of reexports. For CommonJS, the solution must be to hoist reexports from a module directly below the corresponding require statement in the reexporting module, i.e.

    export { foo } from 'bar';
    import 'baz';
    

    should become

    const bar = require('bar');
    exports.foo = bar.foo;
    require('baz');
    

    However, special care needs to be taken to properly support namespace reexports mixed with regular (re)exports as those will always override namespace reexports. Also, the logic should look different for reassigned exports.

    Another point that was added in this PR that is not directly related to circular reexports is which reexporting modules are scanned for side-effects when moduleSideEffects are turned off. Basically the logic now goes like this:

    // main.js
    import { foo } from './first';
    console.log(foo);
    
    // first.js
    // This module will not be considered to add a side-effect as it does not touch the reexported binding
    export { foo } from './second';
    
    // second.js
    // This module WILL be scanned for side-effects as it reexports its own import.
    import { foo } from './third';
    export { foo };
    
    // third.js
    // This module will NOT be scanned for side-effects as the reexport is separate from the import, even though it is the same binding
    export { foo } from './fourth';
    import { foo } from './fourth';
    

    So in short, a direct reexport (export ... from) is ignored when looking for side effects while a reexport using separate import/export statements is considered. The reasoning here is that when I import a binding and the export it again, I may be my intention to mutate this binding in between, e.g. add properties to an object. The commonjs plugin will rely on this feature.

    opened by lukastaegert 43
  • Using Cheerio with Rollup: Duplicate export 'default'

    Using Cheerio with Rollup: Duplicate export 'default'

    Hi,

    I am trying out Rollup for my project, and am having trouble importing cheerio. You can reproduce the issue in this repository I created.

    Anyway, when I try to import cheerio with Rollup (via import cheerio from 'cheerio'), I receive the following error:

    $ npm run build
    
    > [email protected] build /Users/Caleb/Repositories/rollup-cheerio-error
    > rollup -c
    
    
    src/index.js → dist/index.js...
    [!] Error: Duplicate export 'default'
    node_modules/cheerio/lib/options.js (26:22)
    24: export default options;
    25: export { options as __moduleExports };
    26: export { default_1 as default };
                              ^
    27: export { flatten };
    

    Here is my rollup config:

    import commonjs from 'rollup-plugin-commonjs';
    import resolve from 'rollup-plugin-node-resolve';
    import json from 'rollup-plugin-json';
    
    export default {
      input: 'src/index.js',
      output: {
        file: 'dist/index.js',
        format: 'iife',
      },
      name: 'yvs',
      plugins: [
        resolve({
          browser: true,
          preferBuiltins: true
        }),
        commonjs(),
        json()
      ]
    };
    

    Is there anything I can do about this? Any options I can set or plugins I can install? Or is this issue cheerio's responsibility?

    Thanks, Caleb

    opened by caleb531 40
  • [bug] Watch mode does not watch.

    [bug] Watch mode does not watch.

    I just upgraded to 0.53.0 and Rollup no longer even tries to watch anything. Instead, it exits back to the command line right after the first build as if I ran rollup without the --watch option. However, it does enter the alternate buffer while building, but then returns back to the main buffer when the first build finishes.

    opened by trusktr 38
  • Handling of circular dependencies

    Handling of circular dependencies

    Can be seen here.

    The problem is that the Child class cannot really inherit from the Parent, because they come out serialized in a wrong order. This is because a circular dependency on doStuff from ./lib.js exists in Parent, while doStuff depends on Child.

    In this case, however, I believe that a proper solution exists: serialize lib.js first, then parent.js, then child.js (the parent-child order is necessary due to inheritance; the lib-child order can be switched as necessary, as doStuff needs the child to be present later (when executing).

    t¹ 🐞 bug 
    opened by ondras 37
  • Stop recommending node-globals/node-builtins plugin

    Stop recommending node-globals/node-builtins plugin

    The docs recommend users to use rollup-plugin-node-builtins and rollup-plugin-node-globals if you code uses node APIS, but they are pretty much unmaintained.

    For example, rollup-plugin-node-globals uses a very old version of acorn instead of this.parse() provided by rollup, making any build including a dynamic import() to crash.

    I would be great if the rollup organization forked this plugins or find some alternatives. We have submitted a couple of PRs fixing this plugins (since december of 2018), but they are not being merged.

    opened by manucorporat 36
  • chunk hash is different  on different computers

    chunk hash is different on different computers

    on different computers, chunk hash is changed by manual chunks even if not modify anythings.

    I used [email protected] and [email protected] versions, On one computer ,build two times,i can get same hash . on other computer , chunk's hash has be changed. The computer os is the same (macos and node 16)。

    Originally posted by @hulk-yin in https://github.com/rollup/rollup/issues/4394#issuecomment-1228276232

    opened by hulk-yin 1
  • Class names are mangled, breaking runtime behavior that relies on them.

    Class names are mangled, breaking runtime behavior that relies on them.

    Rollup Version

    2.79.0

    Operating System (or Browser)

    Any

    Node Version (if applicable)

    NA

    Link To Reproduction

    https://rollupjs.org/repl/?version=2.79.0&shareable=JTdCJTIybW9kdWxlcyUyMiUzQSU1QiU3QiUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmltcG9ydCUyMFBhcmVudENvbXBvbmVudCUyMGZyb20lMjAnLiUyRnBhcmVudC1jb21wb25lbnQu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wZm9yJTIwdGhlJTIwbGF5ZXIlMjBvZiUyMGluZGlyZWN0aW9uJTIwaW50cm9kdWNlZCUyMGJ5JTIwdnVlMidzJTIwY29tcG9uZW50LW5vcm1hbGl6ZXIuJTVDbmV4cG9ydCUyMGRlZmF1bHQlMjBmdW5jdGlvbihjb21wb25lbnQpJTIwJTdCJTVDbiU1Q3RyZXR1cm4lMjAlN0IlNUNuJTVDdCU1Q3RleHBvcnRzJTNBJTIwY29tcG9uZW50JTVDbiU1Q3QlN0QlNUNuJTdEJTIyJTdEJTVEJTJDJTIyb3B0aW9ucyUyMiUzQSU3QiUyMmZvcm1hdCUyMiUzQSUyMmVzJTIyJTJDJTIybmFtZSUyMiUzQSUyMm15QnVuZGxlJTIyJTJDJTIyYW1kJTIyJTNBJTdCJTIyaWQlMjIlM0ElMjIlMjIlN0QlMkMlMjJnbG9iYWxzJTIyJTNBJTdCJTdEJTdEJTJDJTIyZXhhbXBsZSUyMiUzQW51bGwlN0Q=

    Expected Behaviour

    The resulting output, when executed, prints:

    ParentComponent
    ChildComponent
    

    Actual Behaviour

    The resulting output, when executed, prints:

    ParentComponent$1
    ChildComponent$1
    

    because the class's names are not preserved.

    This repro is a very stripped down example of the output from the Vue component compiler. The real world scenario here is using vue-class-component, which uses the class name as the component name.

    This scenario even follows this workaround, but it does not help.

    Other related issues:

    • https://github.com/rollup/rollup/issues/343#issuecomment-1159022257 (cc @Sidnioulz)
    • https://github.com/nuxt/vite/issues/52 (cc @productdevbook @IlyaSemenov)
    t¹ 🐞 bug 
    opened by ascott18 3
  • Its working on `yarn dev` but after build, and preview its showing an error.

    Its working on `yarn dev` but after build, and preview its showing an error.

    So I actually created a project when I run in yarn dev, eveything works perfectly but after build and preview it this error shows in my console:

    here is a repository: https://github.com/BroJenuel/believers-sword-web

    yarn preview
    yarn run v1.22.19
    $ nuxt preview
    Nuxi 3.0.0-rc.9                                                                                                                                                      19:57:31
    i Node.js version: 16.16.0                                                                                                                                           19:57:31
    i Preset: node-server                                                                                                                                                19:57:31
    i Working dir: .output                                                                                                                                               19:57:31
    i Loading .env. This will not be loaded when running the server in production.                                                                                       19:57:31
    i Starting preview command: node ./server/index.mjs                                                                                                                  19:57:31
                                                                                                                                                                         19:57:31
    Listening on http://0.0.0.0:3000/
    [nuxt] [request error] [unhandled] [500] Named export 'VBinder' not found. The requested module 'vueuc' is a CommonJS module, which may not support all module.exports as named exports.
    CommonJS modules can always be imported via the default export, for example using:
    
    import pkg from 'vueuc';
    const { resizeObserverManager, VResizeObserver, VirtualList, VFollower, VFocusTrap, VBinder, VTarget, VOverflow, VLazyTeleport } = pkg;
    
      at ModuleJob._instantiate (node:internal/modules/esm/module_job:128:21)
      at async ModuleJob.run (node:internal/modules/esm/module_job:194:5)
      at async Promise.all (index 0)
      at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
      at async /D:/Projects/_PersonalProjects/Believers%20Sword%20Project/believers-sword-web-new/.output/server/chunks/renderer.mjs:303:24
      at async /D:/Projects/_PersonalProjects/Believers%20Sword%20Project/believers-sword-web-new/.output/server/chunks/renderer.mjs:359:64
      at async /D:/Projects/_PersonalProjects/Believers%20Sword%20Project/believers-sword-web-new/.output/server/chunks/renderer.mjs:28:22
      at async /D:/Projects/_PersonalProjects/Believers%20Sword%20Project/believers-sword-web-new/.output/server/node_modules/h3/dist/index.mjs:592:19
      at async Server.nodeHandler (/D:/Projects/_PersonalProjects/Believers%20Sword%20Project/believers-sword-web-new/.output/server/node_modules/h3/dist/index.mjs:538:7)
    [nuxt] [request error] [unhandled] [500] Named export 'VBinder' not found. The requested module 'vueuc' is a CommonJS module, which may not support all module.exports as named exports.
    CommonJS modules can always be imported via the default export, for example using:
    
    import pkg from 'vueuc';
    const { resizeObserverManager, VResizeObserver, VirtualList, VFollower, VFocusTrap, VBinder, VTarget, VOverflow, VLazyTeleport } = pkg;
    
      at ModuleJob._instantiate (node:internal/modules/esm/module_job:128:21)
      at async ModuleJob.run (node:internal/modules/esm/module_job:194:5)
      at async Promise.all (index 0)
      at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
      at async /D:/Projects/_PersonalProjects/Believers%20Sword%20Project/believers-sword-web-new/.output/server/chunks/renderer.mjs:303:24
      at async /D:/Projects/_PersonalProjects/Believers%20Sword%20Project/believers-sword-web-new/.output/server/chunks/renderer.mjs:359:64
      at async /D:/Projects/_PersonalProjects/Believers%20Sword%20Project/believers-sword-web-new/.output/server/chunks/renderer.mjs:28:22
      at async /D:/Projects/_PersonalProjects/Believers%20Sword%20Project/believers-sword-web-new/.output/server/node_modules/h3/dist/index.mjs:592:19
      at async Server.nodeHandler (/D:/Projects/_PersonalProjects/Believers%20Sword%20Project/believers-sword-web-new/.output/server/node_modules/h3/dist/index.mjs:538:7)
    [nuxt] [request error] [unhandled] [500] Named export 'VBinder' not found. The requested module 'vueuc' is a CommonJS module, which may not support all module.exports as named exports.
    CommonJS modules can always be imported via the default export, for example using:
    
    import pkg from 'vueuc';
    const { resizeObserverManager, VResizeObserver, VirtualList, VFollower, VFocusTrap, VBinder, VTarget, VOverflow, VLazyTeleport } = pkg;
    
      at ModuleJob._instantiate (node:internal/modules/esm/module_job:128:21)
      at async ModuleJob.run (node:internal/modules/esm/module_job:194:5)
      at async Promise.all (index 0)
      at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
      at async /D:/Projects/_PersonalProjects/Believers%20Sword%20Project/believers-sword-web-new/.output/server/chunks/renderer.mjs:303:24
      at async /D:/Projects/_PersonalProjects/Believers%20Sword%20Project/believers-sword-web-new/.output/server/chunks/renderer.mjs:359:64
      at async /D:/Projects/_PersonalProjects/Believers%20Sword%20Project/believers-sword-web-new/.output/server/chunks/renderer.mjs:28:22
      at async /D:/Projects/_PersonalProjects/Believers%20Sword%20Project/believers-sword-web-new/.output/server/node_modules/h3/dist/index.mjs:592:19
      at async Server.nodeHandler (/D:/Projects/_PersonalProjects/Believers%20Sword%20Project/believers-sword-web-new/.output/server/node_modules/h3/dist/index.mjs:538:7)
    

    image

    opened by BroJenuel 3
  • No useful error provided when importing json array file without @rollup/plugin-json

    No useful error provided when importing json array file without @rollup/plugin-json

    Rollup Version

    ^2.78.0

    Operating System (or Browser)

    MacOS 12.2.1

    Node Version (if applicable)

    No response

    Link To Reproduction

    https://stackblitz.com/edit/node-krh8ki?file=README

    Expected Behaviour

    When requireing a json file, the plugin @rollup/plugin-json is required.

    If the plugin is missing, I would expect to get the message Error: Unexpected token (Note that you need @rollup/plugin-json to import JSON files) - as a new user, this is an extremely helpful error message.

    Actual Behaviour

    When requireing a json file that has an array as the root, and not an object, this error message is not displayed - instead, a much less useful message Error: 'default' is not exported by json-array.json, imported by /home/projects/node-krh8ki/json-array.json?commonjs-proxy is shown.

    t¹ 🐞 bug t⁸ ⋅ triage 
    opened by hannessolo 0
  • Chunk file name hashes depend on absolute path of project

    Chunk file name hashes depend on absolute path of project

    Rollup Version

    2.78.1

    Operating System (or Browser)

    Mac OS

    Node Version (if applicable)

    No response

    Link To Reproduction

    https://github.com/wmassa/rollup-directory-hash-repro

    Expected Behaviour

    According to the documentation, chunk file names are based on content hashes. I think this means that a project should have the same filenames no matter the absolute path of the project.

    Actual Behaviour

    The chunk file names change if you rename the directory of a project.

    I created a repro where the same project is in a directory a and b. Rollup generates different filenames for the chunks. This is weird as I expect both projects to generate the same chunk files.

    E.g. for me, it created a file called Bundle-692bf0ae.js in folder a and a file called Bundle-b8a1dd7d.js in folder b.

    Thanks for looking!

    t¹ 🐞 bug t⁸ ⋅ triage 
    opened by wmassa 1
  • Improve error when manualChunks includes external modules

    Improve error when manualChunks includes external modules

    Expected Behavior / Situation

    When manualChunks includes modules externalized by a plugin.

    Reproduction

    import nodeResolve from '@rollup/plugin-node-resolve';
    
    export default {
      input: 'src/main.js',
      external: ['react'],
      output: {
        dir: 'dist',
        format: 'esm',
        exports: 'auto',
        manualChunks: {
          react: ['react'],
        },
      },
      plugins: [
        nodeResolve(),
        {
          name: 'externalizer',
          resolveId(source, importer, options) {
            if (source === 'react') {
              return { external: true };
            }
          },
        },
      ],
    };
    

    stackblitz

    In a real world situation, this happens when bundling for SSR with Vite (Vite sets external in a plugin).

    Actual Behavior / Situation

    Currently rollup outputs the following error:

    [!] Error: Entry module cannot be external (react).

    I know it's wrong to include externalized modules to manualChunks. But I feel this is a bit difficult to understand. (My understanding is: manualChunks makes each specified module as an entry module, so react is an entry module.)

    Modification Proposal

    Output an error like:

    [!] Error: Manual chunks includes an externalized module (react).

    or

    [!] Error: Externalized module (react) should not be included in manualChunks.

    t⁷ ⋅ modification t⁸ ⋅ triage 
    opened by sapphi-red 0
Releases(v2.79.1)
  • v2.79.1(Sep 22, 2022)

    2022-09-22

    Bug Fixes

    • Avoid massive performance degradation when creating thousands of chunks (#4643)

    Pull Requests

    • #4639: fix: typo docs and contributors link in CONTRIBUTING.md (@takurinton)
    • #4641: Update type definition of resolveId (@ivanjonas)
    • #4643: Improve performance of chunk naming collision check (@lukastaegert)
    Source code(tar.gz)
    Source code(zip)
  • v2.79.0(Aug 31, 2022)

    2022-08-31

    Features

    • Add amd.forceJsExtensionForImports to enforce using .js extensions for relative AMD imports (#4607)

    Pull Requests

    • #4607: add option to keep extensions for amd (@wh1tevs)
    Source code(tar.gz)
    Source code(zip)
  • v2.78.1(Aug 19, 2022)

    2022-08-19

    Bug Fixes

    • Avoid inferring "arguments" as name for a default export placeholder variable (#4613)

    Pull Requests

    • #4613: Prevent using arguments for generated variable names (@lukastaegert)
    Source code(tar.gz)
    Source code(zip)
  • v2.78.0(Aug 14, 2022)

    2022-08-14

    Features

    • Support writing plugin hooks as objects with a "handler" property (#4600)
    • Allow changing execution order per plugin hook (#4600)
    • Add flag to execute plugins in async parallel hooks sequentially (#4600)

    Pull Requests

    • #4600: Allow using objects as hooks to change execution order (@lukastaegert)
    Source code(tar.gz)
    Source code(zip)
  • v2.77.3(Aug 11, 2022)

  • v2.77.2(Jul 27, 2022)

    2022-07-27

    Bug Fixes

    • Avoid a rendering failure when mixing outputs with inlined and non-inlined dynamic imports (#4589)

    Pull Requests

    • #4589: Handle generating non-inlined imports after inlined ones (@lukastaegert)
    Source code(tar.gz)
    Source code(zip)
  • v2.77.1(Jul 26, 2022)

    2.77.1

    2022-07-26

    Bug Fixes

    • Ensure IIFE output generates a global variable when generating ES5 (#4588)

    Pull Requests

    • #4577: broken link removed (@Jawad-H)
    • #4580: Update dependencies (@lukastaegert)
    • #4584: Documentation clarity and syntax improvements (@berniegp)
    • #4588: Use var for IIFE (@lukastaegert)
    Source code(tar.gz)
    Source code(zip)
  • v2.77.0(Jul 15, 2022)

    2022-07-15

    Features

    • Introduce maxParallelFileOps to limit both read and write operations, default to 20 and replaces maxParallelFileRead (#4570)

    Bug Fixes

    • Avoid including variables referenced from return statements that are never reached (#4573)

    Pull Requests

    • #4570: Introduce maxParallelFileOps to limit parallel writes (@lukastaegert)
    • #4572: Document more ways to read package.json in ESM (@berniegp)
    • #4573: Do not include unused return expressions (@lukastaegert)
    Source code(tar.gz)
    Source code(zip)
  • v2.76.0(Jul 8, 2022)

    2022-07-08

    Features

    • Allow setting a sourcmapBaseUrl for absolute paths in sourcemaps (#4527)

    Bug Fixes

    • Support absolute CLI plugin paths on Windows (#4533)

    Pull Requests

    • #4527: Add sourcemapBaseUrl option (@nickgarlis)
    • #4533: Add support for absolute plugin paths (@ygoe)
    • #4538: chore: Included githubactions in the dependabot config (@naveensrinivasan)
    • #4546: Adapt Node versions on CI to prepare for v3 (@lukastaegert)
    • #4556: Improve error message for invalid patterns (@DysphoricUnicorn)
    • #4559: Update dependencies (@lukastaegert)
    • #4560: Bump peter-evans/create-or-update-comment from 1 to 2 (@dependabot)
    • #4561: Bump peter-evans/find-comment from 1 to 2 (@dependabot)
    • #4562: Bump codecov/codecov-action from 1 to 3 (@dependabot)
    Source code(tar.gz)
    Source code(zip)
  • v2.75.7(Jun 20, 2022)

    2022-06-20

    Bug Fixes

    • Mark Array.prototype.group/groupToMap as side effect free. (#4531)

    Pull Requests

    • #4523: chore: remove source map workaround, bump deps (@dnalborczyk)
    • #4525: Add regression tests for instanceof (@lukastaegert)
    • #4528: chore: Set permissions for GitHub actions (@naveensrinivasan)
    • #4531: fix: rename Array.prototype.group/groupToMap (@dnalborczyk)
    • #4535: chore: bump resolve from 1.22.0 to 1.22.1 (@pos777)
    Source code(tar.gz)
    Source code(zip)
  • v2.75.6(Jun 7, 2022)

    2022-06-07

    Bug Fixes

    • Properly deoptimize "this" when using member expressions with getters/setters in for loops and update expressions (#4522)

    Pull Requests

    • #4522: Refactor side effect handling for property interactions (@lukastaegert)
    Source code(tar.gz)
    Source code(zip)
  • v2.75.5(Jun 1, 2022)

    2022-06-01

    Bug Fixes

    • Avoid crashes when using logical expressions for unused constructor arguments (#4519)
    • Fix missing parameter defaults for calls from try statements and functions returned by functions (#4520)

    Pull Requests

    • #4519: Try to make logical expression deoptimization more robust (@lukastaegert)
    • #4520: Roll back parameter default tree shaking (@lukastaegert)
    Source code(tar.gz)
    Source code(zip)
  • v2.75.4(May 31, 2022)

    2022-05-31

    Bug Fixes

    • Ensure parameter defaults are retained when a function is used as an object property (#4516)

    Pull Requests

    • #4516: Deoptimize parameter defaults when referenced from object/array/class literals (@lukastaegert)
    Source code(tar.gz)
    Source code(zip)
  • v2.75.3(May 29, 2022)

    2022-05-29

    Bug Fixes

    • Retain parameter defaults for functions that are defaults themselves (#4515)
    • Track mutations for objects as default values (#4515)

    Pull Requests

    • #4515: Ensure parameter defaults are deoptimized (@lukastaegert)
    Source code(tar.gz)
    Source code(zip)
  • v2.75.1(May 28, 2022)

  • v2.75.0(May 27, 2022)

    2022-05-27

    Features

    • Re-implement default parameter tree-shaking for top-level functions (#4510)
    • Do not consider calling string methods like .trim() on template literals a side effect (#4511)

    Pull Requests

    • #4510: Tree-shake parameter defaults (replaces #4498) (@lukastaegert)
    • #4511: Tree-shake side-effect-free string methods on template literals (@lukastaegert)
    Source code(tar.gz)
    Source code(zip)
  • v2.74.1(May 19, 2022)

  • v2.74.0(May 19, 2022)

    2022-05-19

    Features

    • Remove unneeded default values for function parameters (#4498)

    Bug Fixes

    • Use a consistent mechanism to resolve the config file to avoid issues on Windows (#4501)
    • Avoid an inaccurate warning about an event emitter leak for complicated builds (#4502)
    • Ensure that reexporting values from other chunks via dynamic imports does not reference non-imported variables (#4499)

    Pull Requests

    • #4498: Tree shake parameter defaults (@lukastaegert)
    • #4499: Ensure reexports are available for namespaces (@lukastaegert)
    • #4501: fix: config path problem on windows (@pos777)
    • #4502: Avoid maximum listeners exceeded warning (@lukastaegert)
    Source code(tar.gz)
    Source code(zip)
  • v2.73.0(May 13, 2022)

    2022-05-13

    Features

    • Do not treat Object.defineProperty/ies as side effect when called on an unused object (#4493)
    • Do not assume that assigning a property can create a getter with side effects (#4493)
    • Do not treat string.prototype.replace(All) as side effect when used with two literals (#4493)

    Bug Fixes

    • Detect side effects when manually declaring getters on functions (#4493)

    Pull Requests

    • #4493: Handle getters on functions and improve property deoptimization (@lukastaegert)
    • #4494: Do not treat string.replace as side effect when used with a literal (@lukastaegert)
    • #4495: Update docs for --configPlugin using typescript (@Jimmydalecleveland)
    Source code(tar.gz)
    Source code(zip)
  • v2.72.1(May 7, 2022)

    2022-05-07

    Bug Fixes

    • Improve tree-shaking of classes with super classes in certain scenarios (#4489)

    Pull Requests

    • #4489: Do not deoptimize entire super class when adding a property (@lukastaegert)
    Source code(tar.gz)
    Source code(zip)
  • v2.72.0(May 5, 2022)

    2022-05-05

    Features

    • Add CLI hooks to run external commands at certain points in watch mode (#4457)

    Bug Fixes

    • Fix an issue that could accidentally treat relevant assignments as side effect free (#4486)

    Pull Requests

    • #4457: feat: CLI event hook flags (@Harris-Miller)
    • #4486: Fix reassignment tracking (@lukastaegert)
    Source code(tar.gz)
    Source code(zip)
  • v2.71.1(Apr 30, 2022)

  • v2.71.0(Apr 30, 2022)

    2022-04-30

    Features

    • Mark Object.hasOwn as pure (#4482)

    Bug Fixes

    • Prevent infinite recursion and display proper warning for recursive reexports (#4472)
    • Fix type issue in TypeScript nightly (#4471)

    Pull Requests

    • #4467: docs: update deprecated option in tools.md (@kimjh96)
    • #4471: Fix: tsc did not build (@frank-dspeed)
    • #4472: Throw proper error when indirectly reexporting a recursive binding (@lukastaegert)
    • #4475: chore: bump deps (#4475) (@dnalborczyk)
    • #4477: chore: bump github actions (@dnalborczyk)
    • #4478: ci: test with node.js v18, remove v17 (@dnalborczyk)
    • #4479: chore(repo): replace git.io in the issue template (@SukkaW)
    • #4482: feat: add Object.hasOwn as pure function (@dnalborczyk)
    Source code(tar.gz)
    Source code(zip)
  • v2.70.2(Apr 15, 2022)

    2022-04-15

    Bug Fixes

    • Do not enforce undefined return values in TypeScript types (#4463)

    Pull Requests

    • #4463: use void for options hook instead of undefined (@ycmjason)
    Source code(tar.gz)
    Source code(zip)
  • v2.70.1(Mar 14, 2022)

    2022-03-14

    Bug Fixes

    • Handle unfinished hook action errors as regular errors and avoid console logging (#4434)
    • Allow access to "dist" folder in a Node 17 compatible way (#4436)

    Pull Requests

    • #4434: Track unfinished hook actions as regular errors (@lukastaegert)
    • #4436: Update package.json (@frank-dspeed)
    Source code(tar.gz)
    Source code(zip)
  • v2.70.0(Mar 7, 2022)

    2022-03-07

    Features

    • Make the watchChange and closeWatcher hooks asynchronous and make Rollup wait for these hooks before continuing (#4427)

    Bug Fixes

    • Do not abort watch mode for errors in watchChange but display them properly (#4427)

    Pull Requests

    • #4427: Do not abort watch mode on errors in watchChange (@lukastaegert)
    Source code(tar.gz)
    Source code(zip)
  • v2.69.2(Mar 6, 2022)

    2022-03-06

    Bug Fixes

    • Mark Object.entries and Object.fromEntries as pure (#4429)
    • Make sure new properties on Array.prototype and Object.prototype are not evaluated as "undefined" (#4428)

    Pull Requests

    • #4428: Treat unknown prototype props as unknown (@lukastaegert)
    • #4429: Treat unknown prototype props as unknown (@869288142)
    Source code(tar.gz)
    Source code(zip)
  • v2.69.1(Mar 4, 2022)

    2022-03-04

    Bug Fixes

    • Approximate source position instead of ignoring it when using a low-resolution source map in a transform hook (#4334)

    Pull Requests

    • #4334: fix(sourcemap): fall back to low-resolution line mapping (@aleclarson and @lukastaegert)
    Source code(tar.gz)
    Source code(zip)
  • v2.69.0(Mar 2, 2022)

    2022-03-02

    Features

    • Introduce new output.generatedCode.symbols to control the usage of Symbols in Rollup-generated code (#4378)
    • soft-deprecate output.namespaceToStringTag in favor of output.generatedCode.symbols (#4378)

    Bug Fixes

    • Properly handle ./ and ../ as external dependencies (#4419)
    • Make generated "Module" namespace toStringTag non-enumerable for correct Object.assign/spread behaviour (#4378)
    • Add file name to error when top-level-await is used in disallowed formats (#4421)

    Pull Requests

    • #4378: Make namespace @@toStringTag "Module" non-enumerable (@dnalborczyk and @lukastaegert)
    • #4413: refactor: some code and type fixes (@dnalborczyk)
    • #4418: chore: bump deps (@dnalborczyk)
    • #4419: Properly handle upper directories as external dependencies (@lukastaegert)
    • #4421: Improve the error prompt and output the error file name (@caoxiemeihao)
    • #4423: Update 999-big-list-of-options.md (@leoj3n)
    Source code(tar.gz)
    Source code(zip)
  • v2.68.0(Mar 2, 2022)

    2022-02-22

    Features

    • provide information about cached import resolutions in shouldTransformCachedModule (#4414)
    • Add "types" field to Rollup's package exports (#4416)

    Pull Requests

    • #4410: refactor: use map for declarations and name suggestions (@dnalborczyk)
    • #4411: refactor: use map for namespace reexports by name (@dnalborczyk)
    • #4412: refactor: use includes where appropriate (@dnalborczyk)
    • #4414: Add resolved sources to shouldTransformCachedModule (@lukastaegert)
    • #4416: Add Typescript 4.5 nodenext node12 module resolution support (@frank-dspeed)
    Source code(tar.gz)
    Source code(zip)
Owner
Rollup
Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application.
Rollup
📦🚀 Blazing fast, zero configuration web application bundler

Features ?? Blazing fast bundle times - multicore compilation, and a filesystem cache for fast rebuilds even after a restart. ?? Out of the box suppor

Parcel 41.3k Sep 15, 2022
📦 Zero-configuration bundler for tiny modules.

Microbundle The zero-configuration bundler for tiny modules, powered by Rollup. Guide → Setup ✯ Formats ✯ Modern Mode ✯ Usage & Configuration ✯ All Op

Jason Miller 7.3k Sep 23, 2022
A blazing fast js bundler/loader with a comprehensive API :fire:

A bundler that does it right FuseBox on slack FUSEBOX v4 is out! Install: npm install fuse-box --save-dev import { fusebox } from 'fuse-box'; fusebox

null 4k Sep 24, 2022
Next-generation ES module bundler

Rollup Overview Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a librar

Rollup 22.2k Sep 17, 2022
on-demand module bundler thingy

lurantis An HTTP server that bundles and serves packages from NPM; "bundler as a service." Usage Run the server: npx lurantis --port 8080 Then, send G

Lily Scott 6 Feb 21, 2022
Webpack is an open-source JavaScript module bundler. This includes basic setup files to help me not redo all the setups for webpack when starting a new project.

Webpack Setup Webpack is an open-source JavaScript module bundler. It is made primarily for JavaScript, but it can transform front-end assets such as

Nemwel Boniface 14 Jun 23, 2022
An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.

An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.

Snyk Labs 21 Sep 20, 2022
A next-generation package manager for the front-end

Duo is a next-generation package manager that blends the best ideas from Component, Browserify and Go to make organizing and writing front-end code qu

Duo 3.4k Sep 11, 2022
Next-generation DOM manipulation

Ractive.js - Next-generation DOM manipulation Have any questions or just want to chat? Join us on GitHub Discussions! What is Ractive.js? It's a JavaS

Ractive.js 5.9k Sep 18, 2022
Next generation frontend tooling. It's fast!

Vite ⚡ Next Generation Frontend Tooling ?? Instant Server Start ⚡️ Lightning Fast HMR ??️ Rich Features ?? Optimized Build ?? Universal Plugin Interfa

vite 47.6k Sep 21, 2022
The next generation Javascript WYSIWYG HTML Editor.

Froala Editor V3 Froala WYSIWYG HTML Editor is one of the most powerful JavaScript rich text editors ever. Slim - only add the plugins that you need (

Froala 5k Sep 17, 2022
🐠 Babel is a compiler for writing next generation JavaScript.

The compiler for writing next generation JavaScript. Supporting Babel Babel (pronounced "babble") is a community-driven project used by many companies

Babel 41.4k Sep 20, 2022
Next-generation DOM manipulation

Ractive.js - Next-generation DOM manipulation Have any questions or just want to chat? Join us on GitHub Discussions! What is Ractive.js? It's a JavaS

Ractive.js 5.9k Sep 18, 2022
A next-generation code testing stack for JavaScript.

Intern Software testing for humans ⚠️ This documentation is for the development version of Intern. For the current release version, go here. Intern is

Intern: next-gen JavaScript testing 4.3k Sep 17, 2022
🎉 Next Generation API-first CMS for developers. Generate an API-first CMS from a GraphQL schema with offline prototyping and an inline editor

Tipe Next Generation API-first CMS Design your content Shape and design content for any project you and your team are working on. Create your content

Tipe 2.2k Oct 22, 2021
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server & SQLite

Prisma Quickstart • Website • Docs • Examples • Blog • Slack • Twitter • Prisma 1 What is Prisma? Prisma is a next-generation ORM that consists of the

Prisma 25.6k Sep 20, 2022
🐠 Babel is a compiler for writing next generation JavaScript.

The compiler for writing next generation JavaScript. Supporting Babel Babel (pronounced "babble") is a community-driven project used by many companies

Babel 41.4k Sep 16, 2022
hell.js 🚀 🚀 A JavaScript framework for the 🔥 next 🔥 generation. 🚀

hell.js ?? ?? A JavaScript framework for the ?? next ?? generation. ??

null 30 Aug 20, 2022
A Next + TypeScript Starter. Featuring Styled-Components, ESLint, Prettier, Axe a11y monitoring, Fathom analytics, sitemap generation, and more!

Next + TypeScript Starter A Next + TypeScript Starter by Justin Juno. Featuring Styled-Components, ESLint, Prettier, Axe a11y monitoring, Fathom analy

Justin Juno 7 Aug 26, 2022