refactor: build
This commit is contained in:
parent
ddc1b55a79
commit
4bb8d72e0c
|
@ -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;
|
||||
};
|
9
packages/filters/build/fleck.webpack.config.js
Normal file
9
packages/filters/build/fleck.webpack.config.js
Normal file
|
@ -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;
|
||||
};
|
|
@ -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'],
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user