I was getting these errors:
friendly-errors 15:42:24 ERROR Failed to compile with 1 errors
friendly-errors 15:42:24 This relative module was not found:
friendly-errors 15:42:24
friendly-errors 15:42:24 * ./vendor/polyfills/nodelist-foreach.js in ./.nuxt/nuxt-polyfill/vendor/polyfills/nodelist-foreach.js.js
Until I changed this:
polyfill: {
features: [
{
require: "vendor/polyfills/nodelist-foreach",
detect: function() {
return window.NodeList && !NodeList.prototype.forEach;
}
}
]
}
To:
polyfill: {
features: [
{
require: `${__dirname}/vendor/polyfills/nodelist-foreach`,
detect: function() {
return window.NodeList && !NodeList.prototype.forEach;
}
}
]
}
Not sure if that's the best way though and an example might help others
I was getting these errors:
Until I changed this:
To:
Not sure if that's the best way though and an example might help others