mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
f1c9f1ab68
The Font Awesome font wasn't loaded correctly in the Storybook build. Unlike our other fonts, Font Awesome is copied from `node_modules` at build-time rather than being saved directly in `app/fonts`. The `copy-webpack-plugin` plugin is now used in the Storybook webpack build to copy the fonts explicitly from `node_modules` into the build output directory. The font now seems to load correctly in Storybook.
40 lines
796 B
JavaScript
40 lines
796 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([
|
|
{
|
|
from: path.join('node_modules', '@fortawesome', 'fontawesome-free', 'webfonts'),
|
|
to: path.join('fonts', 'fontawesome'),
|
|
},
|
|
]),
|
|
],
|
|
}
|