Skip to content

Instantly share code, notes, and snippets.

View nyan-left's full-sized avatar
🚀

Deimantas Jakovlevas nyan-left

🚀
View GitHub Profile
@nyan-left
nyan-left / config-overrides.js
Last active January 27, 2021 15:14
Zappar React Three Fiber + CRA rewired config
module.exports = {
webpack: function (config, env) {
config.module.rules = config.module.rules.map(rule => {
if (rule.oneOf instanceof Array) {
rule.oneOf[rule.oneOf.length - 1].exclude = [/\.(js|mjs|zbin|jsx|ts|tsx)$/, /\.html$/, /\.json$/];
return {
...rule,
oneOf: [{
test: /zcv\.wasm$/,
type: "javascript/auto",
const fs = require('fs');
const LINE_NUMBER = 6;
const FILE_LOCATION = 'node_modules/hapi/lib/defaults.js'
const INJECT_FIX_STRING = `
const isWin = process.platform === "win32";
const isLinux = process.platform === "linux";
const isDarwin = process.platform === "darwin";
if (isDarwin || isLinux) {
Os.tmpDir = Os.tmpdir;
} else if (isWin) {