📜  Rails 未定义 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:41.733000             🧑  作者: Mango

代码示例1
// config/webpack/environment.js

const { environment } = require('@rails/webpacker')
const webpack = require('webpack')

environment.plugins.prepend('Provide',
  new webpack.ProvidePlugin({
    Rails: ['@rails/ujs']
  })
)

module.exports = environment