g6/gatsby-node.js

26 lines
539 B
JavaScript
Raw Normal View History

2020-07-21 14:11:39 +08:00
const path = require('path');
2020-11-21 11:56:53 +08:00
2020-11-21 13:38:09 +08:00
exports.onCreateWebpackConfig = ({ getConfig }) => {
2020-07-21 14:11:39 +08:00
const config = getConfig();
config.module.rules.push({
test: /\.glsl$/,
use: [
{
loader: 'raw-loader',
options: {
esModule: false,
},
},
],
});
config.module.rules.push({
test: /\.worker\.ts$/,
use: {
loader: 'worker-loader',
},
});
config.resolve.extensions.push('.glsl');
};