New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rollup-plugin-rebase

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-rebase

The Rollup Rebase Plugin copies static assets as required from your JavaScript code to the destination folder and adjusts the references in there to point to the new location.

  • 0.9.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
increased by16.62%
Maintainers
1
Weekly downloads
 
Created
Source

Rollup Rebase
Sponsored by Version Downloads Build Status Unix Build Status Windows Dependencies

Sponsor

The Rollup Rebase Plugin copies static assets as required from your JavaScript code to the destination folder and adjusts the references in there to point to the new location.

The plugin is meant as a tool for preparing a library for being published. In this it differs from plugins like Rollup URL Plugin as it is designed for usage in libraries and not for applications. The output of this plugin can be used by tools like Webpacks File Loader, URL Loader or the already mentioned Rollup URL Plugin.

Features

  • Copies over asset files references from JavaScript into the given output folder.
  • Adjust asset references in the output JavaScript files to map to the relative new location.
  • Transforms CSS files to inline all includes from @import via PostCSS Smart Import into the origin files.
  • Renames all assets based on their hash (SHA256 + Base62) so that conflicts are automatically eliminated while producing a flat zero depth output structure.
  • Supports normal CSS, but also SugarSS, SCSS and Sass via the standard PostCSS parser plugins.
  • Processes all files which do not match this extension list: .jsx, .js, .tsx, .ts, .json, .vue.

Installation

$ npm install --save-dev rollup-plugin-rebase

or

$ yarn add --dev rollup-plugin-rebase

Usage

Rollup rebase comes with a binary which can be called from within your scripts section in the package.json file.

import rebasePlugin from "rollup-plugin-rebase"

const outputFolder = "./lib";
const rebase = rebasePlugin({ outputFolder })

rollup({
  entry: entry,
  ...
  external: rebase.isExternal,
  ...
  plugins: [
    ...
    rebase
  ]
})
.then((bundle) =>
  bundle.write({
    ...
    dest: `${outputFolder}/index.js`
  })
)
Sebastian Software GmbH Logo

Copyright 2016-2017
Sebastian Software GmbH

Keywords

FAQs

Package last updated on 06 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc