1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 10:30:04 +01:00
metamask-extension/.storybook/webpack.config.js

42 lines
831 B
JavaScript
Raw Normal View History

2018-05-03 19:51:15 +02:00
const path = require('path')
const CopyWebpackPlugin = require('copy-webpack-plugin')
2018-05-03 19:51:15 +02:00
module.exports = {
module: {
strictExportPresence: true,
2018-05-03 19:51:15 +02:00
rules: [
{
test: /\.scss$/,
loaders: [
'style-loader',
{
loader: 'css-loader',
2018-05-03 19:51:15 +02:00
options: {
import: false,
url: false,
2018-05-03 19:51:15 +02:00
},
},
'resolve-url-loader',
{
loader: 'sass-loader',
options: {
sourceMap: true,
},
},
],
},
2018-05-03 19:51:15 +02:00
],
},
plugins: [
Use copy-webpack-plugin@6.0.3 (#9197) 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
2020-08-13 02:32:40 +02:00
new CopyWebpackPlugin({
patterns: [
{
from: path.join('node_modules', '@fortawesome', 'fontawesome-free', 'webfonts'),
to: path.join('fonts', 'fontawesome'),
},
],
}),
],
2018-05-03 19:51:15 +02:00
}