mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
e8b31a77b9
This updates the `copy-webpack-plugin` to the latest published version, 6.0.3, resolving [a high-severity security advisory][1] with its `serialize-javascript` dependency. [1]: https://www.npmjs.com/advisories/1548 See https://www.npmjs.com/advisories/1548 for more information. The `yarn audit` output: ``` ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ high │ Remote Code Execution │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ serialize-javascript │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Patched in │ >=3.1.0 │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ copy-webpack-plugin │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ copy-webpack-plugin > serialize-javascript │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://www.npmjs.com/advisories/1548 │ └───────────────┴──────────────────────────────────────────────────────────────┘ ``` The relevant [`v6.0.0`][2] breaking changes: - minimum supported Node.js version is 10.13 - ✅ We use 10.18.1 locally and on CI - the plugin now accepts an object, you should change `new CopyPlugin(patterns, options)` to `new CopyPlugin({ patterns, options })` - ✅ Updated `.storybook/webpack.config.js` [2]:https://github.com/webpack-contrib/copy-webpack-plugin/releases/tag/v6.0.0
42 lines
831 B
JavaScript
42 lines
831 B
JavaScript
const path = require('path')
|
|
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
|
|
|
module.exports = {
|
|
module: {
|
|
strictExportPresence: true,
|
|
rules: [
|
|
{
|
|
test: /\.scss$/,
|
|
loaders: [
|
|
'style-loader',
|
|
{
|
|
loader: 'css-loader',
|
|
options: {
|
|
import: false,
|
|
url: false,
|
|
},
|
|
},
|
|
'resolve-url-loader',
|
|
{
|
|
loader: 'sass-loader',
|
|
options: {
|
|
sourceMap: true,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new CopyWebpackPlugin({
|
|
patterns: [
|
|
{
|
|
from: path.join('node_modules', '@fortawesome', 'fontawesome-free', 'webfonts'),
|
|
to: path.join('fonts', 'fontawesome'),
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
}
|