You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi elcarim, i have facing the below issue for my current usage in Windows System.
Based on the different path seperator, in mac or linux system, the sepatator is '/', but in Windows Systme, the path.sep is '\'.
In resolve-require-code.js, the genRequireCode will trying to generate the import strings
normal the require.context('packages/', true, /.vue$/) works on below folder structure.
eg.
pacakges/alert/src/index.vue
packages/button/src/index.vue
but in windows system case.
it will become
packages\alert\src\index.vue
pacakges\button\src\index.vue
and after the genRequireCode executed, the import string moduleProps will become below,
'./alert\src\index.vue': require_context_module_0_0,
'./button\src\index.vue': require_context_module_0_1'
And the keys methods the extract the keys from the import modules will trying to convert the string and get rid of the '\' in Windows System.
And at the end when i using the
const files = require.context('packages/', true, /.vue$/)
files.keys().forEach(key => {
console.log(key); // each key become ./alertsrcindex.vue, all the windows separator is get rid of by the Object.keys method.
})
The text was updated successfully, but these errors were encountered:
Hi elcarim, i have facing the below issue for my current usage in Windows System.
Based on the different path seperator, in mac or linux system, the sepatator is '/', but in Windows Systme, the path.sep is '\'.
In resolve-require-code.js, the genRequireCode will trying to generate the import strings
normal the require.context('packages/', true, /.vue$/) works on below folder structure.
eg.
pacakges/alert/src/index.vue
packages/button/src/index.vue
but in windows system case.
it will become
packages\alert\src\index.vue
pacakges\button\src\index.vue
and after the genRequireCode executed, the import string moduleProps will become below,
'./alert\src\index.vue': require_context_module_0_0,
'./button\src\index.vue': require_context_module_0_1'
And the keys methods the extract the keys from the import modules will trying to convert the string and get rid of the '\' in Windows System.
And at the end when i using the
const files = require.context('packages/', true, /.vue$/)
files.keys().forEach(key => {
console.log(key); // each key become ./alertsrcindex.vue, all the windows separator is get rid of by the Object.keys method.
})
The text was updated successfully, but these errors were encountered: