Skip to content

Commit

Permalink
Remove Node 12 specifc code from webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
VeskeR committed Feb 27, 2024
1 parent 083a375 commit 6d2b8ec
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,27 +124,13 @@ const reactNativeConfig = {
*
* 1. This package is designed for Node only and hence requires polyfills of Node libraries (e.g. `stream`, `path`) — webpack takes care of this for us.
* 2. The package is not compatible with RequireJS and hence we don’t have any easy way to directly load it in our tests — the webpack bundle exposes it as a global named MochaJUnitReporter.
*
* - Node: The library uses optional chaining syntax, which is not supported by Node 12.
*/
function createMochaJUnitReporterConfigs() {
const dir = path.join(__dirname, 'test', 'support', 'mocha_junit_reporter');

const baseConfig = {
mode: 'development',
entry: path.join(dir, 'index.js'),
module: {
rules: [
{
// The optional chaining syntax used by mocha-junit-reporter is not supported by Node 12 (see above). Hence, we transpile using Babel.
test: /\.js$/,
loader: 'babel-loader',
options: {
presets: [['@babel/preset-env']],
},
},
],
},
externals: {
mocha: 'mocha.Mocha',
},
Expand Down

0 comments on commit 6d2b8ec

Please sign in to comment.