traveling-salesman-bangkok/gatsby-node.js

21 lines
355 B
JavaScript
Raw Normal View History

2025-02-22 21:18:41 +07:00
exports.onCreateWebpackConfig = ({
actions: { replaceWebpackConfig },
getConfig
}) => {
const config = getConfig();
config.module.rules.push({
test: /\.worker\.js$/,
use: {
loader: "worker-loader",
options: {
inline: true
}
}
});
config.output.globalObject = "this";
replaceWebpackConfig(config);
};