const { env } = require('shakapacker')
const { DefinePlugin } = require('webpack')
const { VueLoaderPlugin } = require('vue-loader')

module.exports = {
  module: {
    rules: [
      {
        test: /\.vue$/,
        loader: 'vue-loader'
      }
    ]
  },
  plugins: [
    new VueLoaderPlugin(),
    new DefinePlugin({
      __VUE_OPTIONS_API__: false,
      __VUE_PROD_DEVTOOLS__: env.isDevelopment,
      __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: env.isDevelopment
    })
  ],
  resolve: {
    extensions: ['.vue']
  }
}
