diff --git a/packages/filters/build/fleck.neutrinorc.js b/packages/filters/build/fleck.neutrinorc.js deleted file mode 100644 index e48d9a4..0000000 --- a/packages/filters/build/fleck.neutrinorc.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = async (flecks) => { - // eslint-disable-next-line import/no-extraneous-dependencies, global-require - const config = await require('@flecks/fleck/server/build/fleck.neutrinorc')(flecks); - config.use.push(({config}) => { - config.module - .rule('glsl') - .test(/\.(frag|glsl|vert)$/) - .use('glsl') - .loader(require.resolve('webpack-glsl-loader')); - }); - return config; -}; diff --git a/packages/filters/build/fleck.webpack.config.js b/packages/filters/build/fleck.webpack.config.js new file mode 100644 index 0000000..fd3e25c --- /dev/null +++ b/packages/filters/build/fleck.webpack.config.js @@ -0,0 +1,9 @@ +module.exports = async (env, argv, flecks) => { + // eslint-disable-next-line import/no-extraneous-dependencies, global-require + const config = await require('@flecks/fleck/server/build/fleck.webpack.config')(env, argv, flecks); + config.module.rules.push({ + test: /\.(frag|glsl|vert)$/, + use: ['webpack-glsl-loader'], + }); + return config; +}; diff --git a/packages/filters/src/server.js b/packages/filters/src/server.js index 95d006d..f4b1008 100644 --- a/packages/filters/src/server.js +++ b/packages/filters/src/server.js @@ -1,11 +1,8 @@ export const hooks = { '@flecks/core.build': (target, config) => { - config.use.push(({config}) => { - config.module - .rule('glsl') - .test(/\.(frag|glsl|vert)$/) - .use('glsl') - .loader(require.resolve('webpack-glsl-loader')); + config.module.rules.push({ + test: /\.(frag|glsl|vert)$/, + use: ['webpack-glsl-loader'], }); }, };