Sha256: 80ef6deed46a887d378d1c7ca592dd23a895dab3fc85841da0bc5fce00dcb7c1

Contents?: true

Size: 1.96 KB

Versions: 1

Compression:

Stored size: 1.96 KB

Contents

let path = require('path');

// Use storybook's default configuration with our customizations
module.exports = (baseConfig, env, defaultConfig) => {

  // overwrite storybook's default import rules
  defaultConfig.module.rules = [
    {
      test: /\.js$/,
      exclude: /node_modules/,
      loader: 'babel-loader',
      options: {
        presets: [
          path.join(__dirname, '..', 'node_modules/babel-preset-react'),
          path.join(__dirname, '..', 'node_modules/babel-preset-env')
        ],
        plugins: [
          path.join(__dirname, '..', 'node_modules/babel-plugin-transform-class-properties'),
          path.join(__dirname, '..', 'node_modules/babel-plugin-transform-object-rest-spread'),
          path.join(__dirname, '..', 'node_modules/babel-plugin-transform-object-assign'),
          path.join(__dirname, '..', 'node_modules/babel-plugin-syntax-dynamic-import')
        ]
      }
    },
    {
      test: /(\.png|\.gif)$/,
      loader: 'url-loader?limit=32767'
    },
    {
      test: /\.css$/,
      loaders: ['style-loader', 'css-loader']
    },
    {
      test: /\.scss$/,
      loaders: ['style-loader', 'css-loader', {
        loader: 'sass-loader',
        options: {
          includePaths: [
            // teach webpack to resolve patternfly dependencies
            path.resolve(__dirname, '..', 'node_modules', 'patternfly', 'dist', 'sass'),
            path.resolve(__dirname, '..', 'node_modules', 'bootstrap-sass', 'assets', 'stylesheets'),
            path.resolve(__dirname, '..', 'node_modules', 'font-awesome-sass', 'assets', 'stylesheets')
          ]
        }
      }]
    },
    {
      test: /\.md$/,
      loaders: ['raw-loader']
    },
    {
      test: /(\.ttf|\.woff|\.woff2|\.eot|\.svg|\.jpg)$/,
      loaders: ['url-loader']
    },
  ]

  defaultConfig.resolve = {
    modules: [
      path.join(__dirname, '..', 'webpack'),
      path.join(__dirname, '..', 'node_modules'),
      'node_modules/',
    ],
  };

  return defaultConfig;
};

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
foreman-tasks-0.15.1 .storybook/webpack.config.js