Sha256: db5f279fca3b6eb8540b35c52406f430847b872ffa5e09f05fca196e88985b38

Contents?: true

Size: 967 Bytes

Versions: 13

Compression:

Stored size: 967 Bytes

Contents

const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin')
const path = require('path')
const { devServer, inliningCss } = require('shakapacker')

const webpackConfig = require('./ServerClientOrBoth')

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.
    const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin')
    clientWebpackConfig.plugins.push(
      new ReactRefreshWebpackPlugin({
        overlay:{
          sockPort: devServer.port
        }
      })
    )
  }

  clientWebpackConfig.plugins.push(
    new ForkTsCheckerWebpackPlugin({
      typescript: {
        configFile: path.resolve(__dirname, '../../tsconfig.json')
      },
      async: false
    })
  )
}
module.exports = webpackConfig(developmentEnvOnly)

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
shakapacker-7.2.3 spec/dummy/config/webpack/development.js
shakapacker-7.3.0.beta.1 spec/dummy/config/webpack/development.js
shakapacker-7.2.2 spec/dummy/config/webpack/development.js
shakapacker-7.2.1 spec/dummy/config/webpack/development.js
shakapacker-7.2.0 spec/dummy/config/webpack/development.js
shakapacker-7.2.0.rc.0 spec/dummy/config/webpack/development.js
shakapacker-7.1.0 spec/dummy/config/webpack/development.js
shakapacker-7.0.3 spec/dummy/config/webpack/development.js
shakapacker-7.0.2 spec/dummy/config/webpack/development.js
shakapacker-7.0.1 spec/dummy/config/webpack/development.js
shakapacker-7.0.0 spec/dummy/config/webpack/development.js
shakapacker-7.0.0.rc.2 spec/dummy/config/webpack/development.js
shakapacker-7.0.0.rc.1 spec/dummy/config/webpack/development.js