How to use the hops-config.moduleDirs function in hops-config

To help you get started, we’ve selected a few hops-config examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xing / hops / packages / build-config / sections / resolve.js View on Github external
},
      hopsConfig.workerFile && {
        'hops-worker-entry-point': hopsConfig.workerFile,
      }
    ),
    mainFields: [
      'esnext:' + platform,
      'jsnext:' + platform,
      platform,
      'esnext',
      'jsnext',
      'esnext:main',
      'jsnext:main',
      'main',
    ],
    modules: ['node_modules'].concat(hopsConfig.moduleDirs),
    extensions: ['.js', '.jsx'],
  };
};
github xing / hops / packages / build-config / sections / module-rules / postcss.js View on Github external
var cssLoaderGlobalOptions = {
  importLoaders: 1,
  sourceMap: true,
};

var cssLoaderLocalOptions = Object.assign({}, cssLoaderGlobalOptions, {
  modules: true,
  localIdentName: '[folder]-[name]-[local]-[hash:8]',
});

var postcssLoaderOptions = {
  ident: 'postcss',
  plugins: [
    require('postcss-import')({
      addModulesDirectories: [].concat(hopsConfig.moduleDirs),
    }),
    require('postcss-cssnext')({
      browsers: hopsConfig.browsers,
    }),
  ],
};

exports.build = {
  test: /\.css$/,
  oneOf: [
    {
      resourceQuery: /global/,
      use: ExtractTextPlugin.extract({
        fallback: 'style-loader',
        use: [
          {