Giter VIP home page Giter VIP logo

Comments (2)

niloc132 avatar niloc132 commented on May 26, 2024

That does seem inconsistent, as the various goog.* patterns do not have that limitation, but it is explicitly documented as being different:

/**
* Pattern for matching import ... from './path/to/file'.
*
* <p>Unlike the goog.require() pattern above, this pattern does not allow multiple statements per
* line. The import/export <b>must</b> be at the beginning of the line to match.
*/
private static final Pattern ES6_MODULE_PATTERN =

The comment seems to suggest (but doesn't outright state) that this is to keep only one statement per line, but then goes on to say that it must be at the start of the line. Perhaps leading whitespace could be acceptable, while still keeping one statement per line?

from closure-compiler.

msevcenko avatar msevcenko commented on May 26, 2024

Ok, just a strange glitch.

Not sure what are the exact consequences of ignoring the directive. Sometimes only the fact that the desired function (minification) actually works. Because processing the directive (in an environment when it cannot be resolved) is often something that user does not want or expect.

And AFAIK, processing static directives cannot be suppressed, can it? Only processing of the dynamic directives can be suppressed with --allow_dynamic_import, right?

from closure-compiler.

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.