Git Product home page Git Product logo

rollup-plugin-glsl-optimize's Issues

ERROR: require an ES module from a CommonJS file

I'm trying to use your plugin and get the following error:

Error: While loading the Rollup configuration from "rollup.config.js", Node tried to require an ES module from a CommonJS file, which is not supported. A common cause is if there is a package.json file with "type": "module" in the same folder. You can try to fix this by changing the extension of your configuration file to ".cjs" or ".mjs" depending on the content, which will prevent Rollup from trying to preprocess the file but rather hand it to Node directly.

changing my config file to mjs did not work because then I can't import variables from package.json (because the json rollup plugin no longer gets transpiled for the config).

Any tips for how I can get this to work?

Integration with glslify

Hi there,

We're using glslify in our Rollup config, but I'd also like to integrate SPIRV optimizations as well. As of now, the import in our codebase will correctly invoke glslify but then I believe the contents are being replaced with the resulting string, so by the time glsl-optimize's plugin gets hit, there's no Vinyl record that is a .glsl file and thus nothing gets run through the optimizer.

What's the best way to handle the combinations of these plugins? I'm having trouble even telling if the plugin is running or doing anything (Rollup's debugging capabilities seem to be lacking here).

Any advice? Thanks so much!

SPIRV cross compilation causes different shader behavior

Interesting project!

Unfortunately I've found that unless I set optimize: false then it results in different behavior in one of my shaders (specifically one thats doing transform feedback).

Process works fine once optimize is disabled,but I found that even just disabling the SPIRV optimizer pass with optimizerDebugSkipOptimizer sadly didn't work so I'm assuming its something to do with the cross compilation step.

Do you have any advice for how to debug?

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.