I'm currently working on creating a custom image transition using a shader, and I require a fragment.glsl file for this purpose. However, when I try to import this file into my .js file, I encounter the following error:
Compiled with problems:
ERROR in ./src/shaders/fragment.glsl 1:13
Module parse failed: Unexpected token (1:13)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> void main () {
|
| }
To get started quickly, I am utilizing the webpack boilerplate available at: https://github.com/taniarascia/webpack-boilerplate
Due to my limited experience with webpack and glsl files, I am unsure of what is causing the issue. My assumption is that the browser is unable to read the file. I have tried various approaches with webpack.config.js and modules like glfl-loader but it seems like my browser has different plans.