mirror of https://github.com/waku-org/js-waku.git
Format js config file
This commit is contained in:
parent
e18c4f1619
commit
add78bce71
|
@ -6,27 +6,27 @@ module.exports = {
|
|||
if (!config.resolve) config.resolve = {};
|
||||
if (!config.resolve.fallback) config.resolve.fallback = {};
|
||||
Object.assign(config.resolve.fallback, {
|
||||
"buffer": require.resolve("buffer"),
|
||||
"crypto": require.resolve("crypto-browserify"),
|
||||
"stream": require.resolve("stream-browserify"),
|
||||
// "assert": require.resolve("assert")
|
||||
}
|
||||
)
|
||||
buffer: require.resolve('buffer'),
|
||||
crypto: require.resolve('crypto-browserify'),
|
||||
stream: require.resolve('stream-browserify'),
|
||||
// "assert": require.resolve("assert")
|
||||
});
|
||||
|
||||
if (!config.plugins) config.plugins = []
|
||||
if (!config.plugins) config.plugins = [];
|
||||
config.plugins.push(
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.ENV': JSON.stringify("dev"),
|
||||
'process.env.ENV': JSON.stringify('dev'),
|
||||
})
|
||||
)
|
||||
);
|
||||
config.plugins.push(
|
||||
new webpack.ProvidePlugin({
|
||||
process: 'process/browser.js',
|
||||
Buffer: ['buffer', 'Buffer'],
|
||||
}));
|
||||
})
|
||||
);
|
||||
|
||||
if (!config.ignoreWarnings) config.ignoreWarnings = []
|
||||
config.ignoreWarnings.push(/Failed to parse source map/)
|
||||
if (!config.ignoreWarnings) config.ignoreWarnings = [];
|
||||
config.ignoreWarnings.push(/Failed to parse source map/);
|
||||
|
||||
return config;
|
||||
},
|
||||
|
@ -35,28 +35,28 @@ module.exports = {
|
|||
if (!config.resolve) config.resolve = {};
|
||||
if (!config.resolve.fallback) config.resolve.fallback = {};
|
||||
Object.assign(config.resolve.fallback, {
|
||||
"buffer": require.resolve("buffer"),
|
||||
"crypto": require.resolve("crypto-browserify"),
|
||||
"stream": require.resolve("stream-browserify"),
|
||||
// "assert": require.resolve("assert")
|
||||
}
|
||||
)
|
||||
buffer: require.resolve('buffer'),
|
||||
crypto: require.resolve('crypto-browserify'),
|
||||
stream: require.resolve('stream-browserify'),
|
||||
// "assert": require.resolve("assert")
|
||||
});
|
||||
|
||||
if (!config.plugins) config.plugins = []
|
||||
if (!config.plugins) config.plugins = [];
|
||||
config.plugins.push(
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.ENV': JSON.stringify("prod"),
|
||||
'process.env.ENV': JSON.stringify('prod'),
|
||||
})
|
||||
)
|
||||
);
|
||||
config.plugins.push(
|
||||
new webpack.ProvidePlugin({
|
||||
process: 'process/browser.js',
|
||||
Buffer: ['buffer', 'Buffer'],
|
||||
}));
|
||||
})
|
||||
);
|
||||
|
||||
if (!config.ignoreWarnings) config.ignoreWarnings = []
|
||||
config.ignoreWarnings.push(/Failed to parse source map/)
|
||||
if (!config.ignoreWarnings) config.ignoreWarnings = [];
|
||||
config.ignoreWarnings.push(/Failed to parse source map/);
|
||||
|
||||
return config;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -37,9 +37,9 @@
|
|||
"fix": "run-s fix:*",
|
||||
"test": "run-s build test:*",
|
||||
"test:lint": "eslint src --ext .ts --ext .tsx",
|
||||
"test:prettier": "prettier \"src/**/*.{ts,tsx}\" \"./*.json\" --list-different",
|
||||
"test:prettier": "prettier \"src/**/*.{ts,tsx}\" \"./*.json\" \"./config/*.js\" --list-different",
|
||||
"test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.{ts,tsx},public/**/*.html}\" -c ../../.cspell.json",
|
||||
"fix:prettier": "prettier \"src/**/*.{ts,tsx}\" \"./*.json\" --write",
|
||||
"fix:prettier": "prettier \"src/**/*.{ts,tsx}\" \"./*.json\" \"./config/*.js\" --write",
|
||||
"fix:lint": "eslint src --ext .ts --ext .tsx --fix",
|
||||
"proto": "run-s proto:*",
|
||||
"proto:build": "buf generate",
|
||||
|
|
Loading…
Reference in New Issue