jfortunato / esbuild-plugin-manifest

Esbuild plugin for building an asset manifest file.
MIT License
31 stars 5 forks source link

error: Cannot set properties of undefined (setting 'metafile') #8

Closed localesp closed 2 years ago

localesp commented 2 years ago

After following the instructions and building I get the following error.

/home/x/code/esbuild/node_modules/esbuild-plugin-manifest/lib/index.js:51:38: error: Cannot set properties of undefined (setting 'metafile')
    51 │         build.initialOptions.metafile = true;
       ╵                                       ^
    at setup (/home/esp/code/esbuild/node_modules/esbuild-plugin-manifest/lib/index.js:51:39)
    at handlePlugins (/home/esp/code/esbuild/node_modules/esbuild/lib/main.js:659:7)

package.json file looks like

{
  "scripts": {
    "build": "node esbuild.js"
  },
  "devDependencies": {
    "esbuild": "^0.8.57",
    "esbuild-plugin-manifest": "^0.4.6"
  }
}

This is my first time using esbuild as well, so it could just be me using it wrong.

jfortunato commented 2 years ago

You will need to use a more recent version of esbuild, anything above 0.11.15 should work.