Code Monkey home page Code Monkey logo

rollup-plugin-remap's Introduction

Travis

rollup-plugin-remap

Plugin to remap imported modules to other file paths. Useful for conditional compilation, ie: remapping development focused modules to a noop during a production build.

Examples

In this example, we're remapping a logger module to a noop module during a production build of a project.

rollup.config.js

const plugins = [];

if (process.env.BUILD_MODE === 'proudction') {
  plugins.push(remap({
    originalPath: 'src/logger.js',
    targetPath: 'src/noop.js'
  }));
}
export default {
  entry: 'src/someModule.js',
  plugins
}

Would remap the following import to a file called src/noop.js.

src/someModule.js

import logger from './logger';

export default function doStuff() {
  // ...
  // do some stuff
  // ...

  logger('I did some stuff');
}

rollup-plugin-remap's People

Contributors

minasmart avatar

Stargazers

 avatar

Watchers

Shay avatar Lourens Naudé avatar Christian Zacharias avatar Elvio Vicosa avatar Matthew Higgins avatar Jeff Bruton avatar Mai avatar Alexander Leach avatar Lucas Souza avatar Theo Oikonomou avatar Jamie Sutton avatar @lamp avatar Rohit Mishra avatar Ryan Florence avatar Stella Miranda avatar Caroline avatar Ben Watts avatar Ben Doyle avatar Stephen Hunter avatar tetchi avatar Luiz Adolpho avatar Bart Piotrowski avatar Jon Yonker avatar Lucas Medeiros avatar Shadab Rashid avatar Christian Shum-Harden avatar Jeremy Morony avatar Nicholas Pan avatar  avatar Dan Menard avatar Mark Ryan avatar Mladen Rangelov avatar Peter de Wit avatar Michael Nugent avatar Sebastian Skopp avatar Julia Winn avatar James Cloos avatar Thiago Colares avatar Chris Waters avatar Ivan Savytskyi avatar Misha Korablin avatar Thomas Conner avatar Stephen Hukish avatar Ryan Self avatar Marcelo nakashima de brito avatar Karthik K N avatar Corwin Brown avatar Arpan Podduturi avatar João Júnior avatar Daniel Leroux avatar Igor Kozlov avatar Chris Shaw avatar Andrea Di Persio avatar Alex Fi avatar Ahmad Alhour avatar Nik Ivanov avatar Tim Lombardo avatar Javier Barrera avatar Kaj Drobin avatar Paul Gagliardi avatar Annett Forcier avatar Conor Malone avatar Mounir avatar Guil H avatar josh sucher avatar Frank Reding avatar Satish Kanwar avatar Niko Kurtti avatar Liz McDonald avatar Thomaz de Oliveira dos Reis avatar Ann  Wallace avatar Alejandro Gonzalez avatar  avatar Brandon avatar Topher Bullock avatar Dan Winkler avatar Louis Kearns avatar Anita Mehrotra avatar Weslley Araujo avatar  avatar Sharad Gaur avatar  avatar Dave McVittie avatar Yungjae avatar Jared Rader avatar Ravi Byakod avatar Robleh Jama avatar  avatar Nick Lee avatar Collin Brink avatar Damyan Petkov avatar Julia Nguyen avatar Armando avatar David Little avatar Nicholas Simmons avatar Juan Guzman avatar Kirsten Westeinde avatar Solmaz avatar Michael Beddall avatar Pauline Ramos avatar

rollup-plugin-remap's Issues

Update public package publish config

👋 Shipit has recently been updated to support private npm package publishing. The @shopify scope for npm packages in Shipit now references our internal PackageCloud registry by default. You can read more about this here.

This library, however, uses a Shipit deploy override in shipit.yml which prevents Shipit from automating the public/private registry selection.

Since this library is public, please update the package.json by specifying the public registry in the publishConfig setting.

"publishConfig": {
  "access": "public",
  "@shopify:registry": "https://registry.npmjs.org/"
}

If possible, we also recommend removing the shipit.yml deploy override to leverage Shipit’s default deployment steps.

rollup-plugin-remap: Classification Check

Classification Check

TL;DR

1st party software must have a business impact classification. See our list of classification to help you determine the classification of your application.

Why is this being asked?

It's critical that we understand the business impact of the software we write. The classification of your service determines the level of support you must provide as owners and helps us set standards.

What will happen if it doesn't get done within the expected timeframe?

This is mandatory. If this is not done you won't be able to have any runtimes.

When does it need to get done?

At the latest, this should be done before 2021-07-22.

This doesn't apply to my service. What do I do?

First, leave a comment explaining why it doesn't apply. Then, leave another comment as /not_applicable, and close the issue.
If you change your mind, make sure to comment any reason and reopen the issue.

I have questions/concerns about this

Please contact the Production Excellence team using Slack at #production-excellence-team.
Your service: rollup-plugin-remap/production
Owners:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.