Sha256: b9fcfd20aabafd8244c2afa701b726f762da91a25b185ac4eed2f7702c6b1054
Contents?: true
Size: 1.33 KB
Versions: 1
Compression:
Stored size: 1.33 KB
Contents
// Run like this: // cd client && npm run build:dev // Note that Foreman (Procfile.dev) has also been configured to take care of this. // NOTE: All style sheets handled by the asset pipeline in rails const webpack = require('webpack'); const config = require('./webpack.client.base.config'); const devBuild = process.env.NODE_ENV !== 'production'; config.output = { filename: '[name]-bundle.js', path: '../app/assets/javascripts/generated', }; // You can add entry points specific to rails here // The es5-shim/sham is for capybara testing config.entry.vendor.unshift( 'es5-shim/es5-shim', 'es5-shim/es5-sham' ); // jquery-ujs MUST GO AFTER jquery, so must use 'push' config.entry.vendor.push('jquery-ujs'); // See webpack.common.config for adding modules common to both the webpack dev server and rails config.module.loaders.push( { test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/ }, { test: require.resolve('react'), loader: 'imports?shim=es5-shim/es5-shim&sham=es5-shim/es5-sham' } ); module.exports = config; if (devBuild) { console.log('Webpack dev build for Rails'); // eslint-disable-line no-console module.exports.devtool = 'eval-source-map'; } else { config.plugins.push( new webpack.optimize.DedupePlugin() ); console.log('Webpack production build for Rails'); // eslint-disable-line no-console }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
react_on_rails-2.0.0.rc.3 | lib/generators/react_on_rails/templates/base/base/client/webpack.client.rails.config.js |