This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", |