mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
d72f7295a3
* Adding storybook essentials and documentation contribution guidelines * Deprecation updates * Update ui/2.DOCUMENTATION.stories.mdx Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com> * Updating spelling and adding label to i18n-party plugin in toolbar Co-authored-by: kumavis <kumavis@users.noreply.github.com> Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
64 lines
1.5 KiB
JavaScript
64 lines
1.5 KiB
JavaScript
const path = require('path');
|
|
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
|
|
module.exports = {
|
|
stories: ['../ui/**/*.stories.js', '../ui/**/*.stories.mdx'],
|
|
addons: [
|
|
'@storybook/addon-essentials',
|
|
'@storybook/addon-actions',
|
|
'@storybook/addon-a11y',
|
|
'@storybook/addon-knobs',
|
|
'./i18n-party-addon/register.js',
|
|
],
|
|
// Uses babel.config.js settings and prevents "Missing class properties transform" error
|
|
babel: async (options) => ({ overrides: options.overrides }),
|
|
webpackFinal: async (config) => {
|
|
config.context = process.cwd();
|
|
config.node = {
|
|
__filename: true,
|
|
};
|
|
config.module.strictExportPresence = true;
|
|
config.module.rules.push({
|
|
test: /\.scss$/,
|
|
loaders: [
|
|
'style-loader',
|
|
{
|
|
loader: 'css-loader',
|
|
options: {
|
|
import: false,
|
|
url: false,
|
|
},
|
|
},
|
|
'resolve-url-loader',
|
|
{
|
|
loader: 'sass-loader',
|
|
options: {
|
|
sourceMap: true,
|
|
implementation: require('sass'),
|
|
sassOptions: {
|
|
includePaths: ['ui/css/'],
|
|
},
|
|
},
|
|
},
|
|
],
|
|
});
|
|
config.plugins.push(
|
|
new CopyWebpackPlugin({
|
|
patterns: [
|
|
{
|
|
from: path.join(
|
|
'node_modules',
|
|
'@fortawesome',
|
|
'fontawesome-free',
|
|
'webfonts',
|
|
),
|
|
to: path.join('fonts', 'fontawesome'),
|
|
},
|
|
],
|
|
}),
|
|
);
|
|
return config;
|
|
},
|
|
};
|