1、 安装webpack-glsl-loader
npm install webpack-glsl-loader
2、修改vue.config.js配置,添加内容如下
module.exports = defineConfig({ configureWebpack: (config) => { config.module.rules.push({ test: /\.glsl$/, use: [ { loader: "webpack-glsl-loader", }, ], }); }, })
标签:glsl,vue,module,loader,webpack,config From: https://www.cnblogs.com/yiliangmi/p/17306400.html