Sha256: bf90b245059879082ad3ffd24f4524cb0b768c1e1d428ca0b2f545bcd7d8902a

Contents?: true

Size: 955 Bytes

Versions: 4

Compression:

Stored size: 955 Bytes

Contents

// Wbpack configuration for server bundle

const webpack = require('webpack');
const path = require('path');

module.exports = {

  // the project dir
  context: __dirname,
  entry: ['./app/bundles/HelloWorld/startup/serverGlobals'],
  output: {
    filename: 'server-bundle.js',
    path: '../app/assets/javascripts/generated',
  },
  resolve: {
    extensions: ['', '.webpack.js', '.web.js', '.js', '.jsx', 'config.js'],
    alias: {
      lib: path.join(process.cwd(), 'app', 'lib'),
    },
  },
  plugins: [
    new webpack.DefinePlugin({
      'process.env': {
        NODE_ENV: JSON.stringify('production'),
      },
    }),
  ],
  module: {
    loaders: [
      {test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/},

      // React is necessary for the client rendering:
      {test: require.resolve('react'), loader: 'expose?React'},
      {test: require.resolve('react-dom/server'), loader: 'expose?ReactDOMServer'},
    ],
  },
};

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
react_on_rails-1.0.3 lib/generators/react_on_rails/templates/base/server_rendering/client/webpack.server.rails.config.js
react_on_rails-1.0.2 lib/generators/react_on_rails/templates/base/server_rendering/client/webpack.server.rails.config.js
react_on_rails-1.0.1 lib/generators/react_on_rails/templates/base/server_rendering/client/webpack.server.rails.config.js
react_on_rails-1.0.0 lib/generators/react_on_rails/templates/base/server_rendering/client/webpack.server.rails.config.js