Field 'browser' doesn't contain a valid alias configuration

后端 未结 16 2338
无人共我
无人共我 2020-12-01 11:54

I\'ve started using webpack2 (to be precise, v2.3.2) and after re-creating my config I keep running into an issue I can\'t seem to solve I get (sorry in advance

16条回答
  •  长情又很酷
    2020-12-01 12:07

    In my case it was a package that was installed as a dependency in package.json with a relative path like this:

    "dependencies": {
      ...
      "phoenix_html": "file:../deps/phoenix_html"
    },
    

    and imported in js/app.js with import "phoenix_html"

    This had worked but after an update of node, npm, etc... it failed with the above error-message.

    Changing the import line to import "../../deps/phoenix_html" fixed it.

提交回复
热议问题