https://codesandbox.io/s/zwvk4z2nl3
export const module = {} line.import {module} from "~/store/test" line in pages/index.vuePage should be displayed without an error.
"Identifier 'module' has already been declared" error
It is not a bug. module is global object in node .
You can use module.exports = { variables } to export variables to another module .
So when you are using const to redefine the module, it will throw expection .
Ok, fair enough. That's a little strange however - between Nuxt versions 2.2 to 2.4 it worked flawlessly. Something changed in 2.5 or 2.6 that makes this node's "module" exposed?
Most helpful comment
It is not a bug.
moduleis global object in node .You can use
module.exports = { variables }to exportvariablesto another module .So when you are using
constto redefine themodule, it will throw expection .