From ce59c05124483620c5327b50b64c8755d7e81390 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 24 Oct 2020 17:39:43 +0200 Subject: [PATCH] undo unrelated changes --- packages/storybook/.storybook/main.js | 35 ++++++++++++--------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/packages/storybook/.storybook/main.js b/packages/storybook/.storybook/main.js index ec2d98c5bf373..045404e9c4cbc 100644 --- a/packages/storybook/.storybook/main.js +++ b/packages/storybook/.storybook/main.js @@ -1,16 +1,16 @@ const path = require('path'); const webpack = require('webpack'); -const env = process.env.NODE_ENV || 'development'; +const env = process.env.NODE_ENV || 'development' /* eslint-disable */ -const __DEV__ = env === 'development'; -const __PROD__ = env === 'production'; +const __DEV__ = env === 'development' +const __PROD__ = env === 'production' /* eslint-enable */ if (!(__DEV__ || __PROD__)) { - throw new Error(`Unknown env: ${env}.`); + throw new Error(`Unknown env: ${env}.`) } -console.log(`Loading config for ${env}`); +console.log(`Loading config for ${env}`) const maxAssetSize = 1024 * 1024; module.exports = { @@ -24,17 +24,17 @@ module.exports = { '@storybook/addon-a11y/register', ], typescript: { - check: __DEV__, // Already covered by yarn typescript - reactDocgen: false, + check: __DEV__, // Netlify is breaking the deploy with this settings on. So deactivate on release + reactDocgen: false }, - webpackFinal: async (config) => { + webpackFinal: async config => { config.parallelism = 1; config.module.rules.push({ test: /\.(ts|tsx)$/, use: [ { loader: require.resolve('ts-loader'), - }, + } ], }); if (__DEV__) { @@ -42,8 +42,8 @@ module.exports = { test: /\.(ts|tsx)$/, use: ['source-map-loader'], enforce: 'pre', - exclude: /node_modules/, - include: path.resolve(__dirname, '../../../packages/grid/'), + exclude: /node_modules/, + include: path.resolve(__dirname, '../../../packages/grid/') }); } @@ -54,7 +54,7 @@ module.exports = { loader: require.resolve('@storybook/source-loader'), options: { parser: 'typescript', - prettierConfig: { printWidth: 80, singleQuote: true }, + prettierConfig: {printWidth: 80, singleQuote: true}, tsconfigPath: path.resolve(__dirname, '../tsconfig.json'), }, }, @@ -68,7 +68,7 @@ module.exports = { options: { search: '__RELEASE_INFO__', replace: 'MTU5NjMxOTIwMDAwMA==', // 2020-08-02 - }, + } }); config.optimization = { @@ -76,20 +76,17 @@ module.exports = { chunks: 'all', minSize: 30 * 1024, maxSize: maxAssetSize, - }, + } }; config.performance = { - maxAssetSize: maxAssetSize, + maxAssetSize: maxAssetSize }; config.resolve = { ...config.resolve, extensions: ['.js', '.ts', '.tsx'], alias: { '@material-ui/data-grid': path.resolve(__dirname, '../../../packages/grid/data-grid/src'), - '@material-ui/x-grid-data-generator': path.resolve( - __dirname, - '../../../packages/x-grid-data-generator/src', - ), + '@material-ui/x-grid-data-generator': path.resolve(__dirname, '../../../packages/x-grid-data-generator/src'), '@material-ui/x-grid': path.resolve(__dirname, '../../../packages/grid/x-grid/src'), '@material-ui/x-license': path.resolve(__dirname, '../../../packages/x-license/src'), },