Skip to content

Commit

Permalink
Merge pull request #61 from spryker/bugfix/cc-29874-add-node-polyfill…
Browse files Browse the repository at this point in the history
…-webpack-plugin

CC-29874 Added NodePolyfillPlugin plugin to the webpack config.
  • Loading branch information
Yuriy Gerton authored Sep 14, 2023
2 parents 8c4f614 + 1eff4bd commit 5b4f983
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 77 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

### 3.1.0
Released on 15.09.2023

- Adjusted webpack config by introducing `NodePolyfillPlugin` usage from `node-polyfill-webpack-plugin`.
- Updated dependencies:
- `webpack`: `5.81.0` => `5.88.2`

### 3.0.0
Released on 11.05.2023

Expand Down
8 changes: 8 additions & 0 deletions lib/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const find = require('./find');
const configurePaths = require('./configure-paths');

let NodePolyfillPlugin;

try {
NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
} catch (e) {}

async function getConfiguration(settings) {
let mode = 'development';
let devtool = 'inline-source-map';
Expand Down Expand Up @@ -172,6 +178,8 @@ async function getConfiguration(settings) {
new MiniCssExtractPlugin({
filename: `./css/[name].css`,
}),

NodePolyfillPlugin ? new NodePolyfillPlugin() : null,
],
};

Expand Down
150 changes: 75 additions & 75 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5b4f983

Please sign in to comment.