Giter Club home page Giter Club logo

Comments (3)

Rich-Harris avatar Rich-Harris commented on July 24, 2024

Come to think of it, I would vote for this change as well - I think it'd be more robust that way. Though you'd need to have some way of saying 'use the default transformation on this module name' without applying it yourself (maybe if no value, or a falsy value, is returned)

from amdclean.

radekn avatar radekn commented on July 24, 2024

@Rich-Harris What I suggest is that the default transformation is still applied, only after the prefixTransform function, not before it. In case you wanted to use only the default transformation, you'd just have to return the module name unchanged in prefixTransform.

I based on the assumption that the default transformation has any effect only when the name is not a valid JS identifier. In other words, in case the name returned from prefixTransform is already a valid identifier, default transformation will not change it. Am I right here?

from amdclean.

gfranko avatar gfranko commented on July 24, 2024

In AMDclean 2.3.0, the prefixTransform option has been updated to pass BOTH post normalized and pre normalized module names:

  'prefixTransform': function(postNormalizedModuleName, preNormalizedModuleName) {
    return postNormalizedModuleName;
  }

from amdclean.

Related Issues (20)

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.