vite version: ^0.20.2vue version (from yarn.lock or package-lock.json)@vue/compiler-sfc versionimport createLogger from 'vuex/dist/logger';
Uncaught SyntaxError: The requested module '/@modules/vuex/dist/logger' does not provide an export named 'default'
Not a "vuex/dist/logger" issue? I've got piles of such errors.
What about optimizeDeps.exclude?:
optimizeDeps: {
exclude: ['vuex']
}
What about
optimizeDeps.exclude?:optimizeDeps: { exclude: ['vuex'] }still console this error Uncaught SyntaxError: The requested module '/@modules/vuex/dist/logger' does not provide an export named 'default'
It doesn't work
Not a "vuex/dist/logger" issue? I've got piles of such errors.
The problem does not occur when using vue/cli
Is it under dependencies or devDependencies? Maybe #162, #174 or #240 could help.
under the dependencies
"dependencies": {
"vuex": "^4.0.0-beta.2"
For umd modules.You can add blew code into vite.config.js
optimizeDeps: {
include: ['vuex/dist/logger']
}
thanks @underfin
Hmm, this is a problem in vuex@next. We need an ESM dist for the logger. /cc @kiaking
Oh OK. Indeed we only have 1 build for logger so we should create same build types as Vue and Vuex then. I'll work on to it 馃憤
Most helpful comment
Hmm, this is a problem in
vuex@next. We need an ESM dist for the logger. /cc @kiaking