GithubHelp home page GithubHelp logo

Comments (4)

FND avatar FND commented on July 23, 2024

This happens due to tree shaking, for which so far there wasn't a reason to make it configurable. In your case, you'll want to export render:

export default function render() {
    
}
module.exports = {
    
    js: [{
        
        exports: "render",}]
};

You might also be interested in #97's WIP documentation: https://github.com/faucet-pipeline/faucet-pipeline-js/blob/docs/README.md

HTH.

from faucet-pipeline-js.

lsund avatar lsund commented on July 23, 2024

Thanks for the reply and the hint to the documentation. I did export the function, but it also generates the line export default render which the caller cannot handle. I'm trying to use the generated views.js with the java Nashorn Scripting Engine, below is the error message to be specific.

I'm using these technologies for the first time (both the java as well as the javascript side) so it is possible that I can work around it in some other way that I do not yet know. I'll need to have another look at this at some later point. Thanks!

failed to evaluate script ('render' in 'filepath') <eval>:509:0 Expected an operand but found export export default render; ^
com.github.complate.ScriptingException: failed to evaluate script ('render' in 'filepath')
<eval>:509:0 Expected an operand but found export
export default render;

from faucet-pipeline-js.

FND avatar FND commented on July 23, 2024

from faucet-pipeline-js.

lsund avatar lsund commented on July 23, 2024

That indeed works! thanks for the help :) Closing this.

from faucet-pipeline-js.

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.