Sha256: 7b3e001a93d1885d809354bc3c0b56d610bf11cbc4c43be6c1a995c18f538708
Contents?: true
Size: 984 Bytes
Versions: 1
Compression:
Stored size: 984 Bytes
Contents
<%= add_documentation_reference(config[:message], "// https://github.com/shakacode/react_on_rails_tutorial_with_ssr_and_hmr_fast_refresh/blob/master/config/webpack/development.js") %> process.env.NODE_ENV = process.env.NODE_ENV || 'development'; const { devServer, inliningCss } = require('shakapacker'); const webpackConfig = require('./webpackConfig'); const developmentEnvOnly = (clientWebpackConfig, _serverWebpackConfig) => { // plugins if (inliningCss) { // Note, when this is run, we're building the server and client bundles in separate processes. // Thus, this plugin is not applied to the server bundle. // eslint-disable-next-line global-require const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin'); clientWebpackConfig.plugins.push( new ReactRefreshWebpackPlugin({ overlay: { sockPort: devServer.port, }, }), ); } }; module.exports = webpackConfig(developmentEnvOnly);
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
react_on_rails-13.0.0.beta.0 | lib/generators/react_on_rails/templates/base/base/config/webpack/development.js.tt |