【问题标题】:How to create a manifest.json file for webpackerlite如何为 webpackerlite 创建 manifest.json 文件
【发布时间】:2017-09-04 14:12:07
【问题描述】:

我正在使用 React_on_rails,在克隆了他们的示例后,我无法让它与 webpacker_lite 一起使用。当我运行开发服务器时,出现此错误:

`WebpackerLite::FileLoader::NotFoundError in Pages#index
   WebpackerLite can't find the manifest file: /FILE PATH/react-webpack-rails-tutorial/public/webpack/development/manifest.json
    Possible causes:
      1. You have not invoked webpack.
      2. You have misconfigured WebpackerLite's config/webpacker_lite.yml file.
      3. Your Webpack configuration is not creating a manifest.
`

我已经安装了 webpack-manifest-plugin 并添加了:

  var ManifestPlugin = require('webpack-manifest-plugin');

module.exports = {
    // ... 
    plugins: [
      new ManifestPlugin()
    ]
};

webpack-manifest-plugin 的文档说这会生成一个 manifest.json,但它看起来不像。

【问题讨论】:

    标签: ruby-on-rails reactjs webpack


    【解决方案1】:

    前几天我们遇到了这个问题。

    使用foreman start -f Procfile.dev而不是rails s来启动服务器

    您可以在 if-me here 上查看我们是如何解决问题的

    我们尝试了很多方法,包括对 node、npm 和 yarn 的更新,所以如果上述方法不起作用,请确保您已经更新了依赖于此的软件包。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-01-31
      • 1970-01-01
      • 2020-04-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-28
      相关资源
      最近更新 更多