Skip to content

Commit 77bb37f

Browse files
authored
Merge pull request #5813 from vuestorefront/theme-error-fix
fix: theme/index error fixed
2 parents b303544 + 38dc363 commit 77bb37f

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4141
- Purge loader works properly with dynamic config reload - @Fifciu
4242
- Multi-tab cart-sync in multi-store environment - @cewald (#5711, #5732)
4343
- Incorrect load of default address in checkout - @lukaszjedrasik ([#4682](https://github.com/vuestorefront/vue-storefront/issues/4682))
44+
- Error with unknown theme/index.js alias - @Fifciuu (https://github.com/vuestorefront/vue-storefront/pull/5813)
4445

4546
### Changed / Improved
4647

core/scripts/generate-files.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,10 @@ csvDirectories.push(path.resolve(__dirname, themeResources + '/i18n/'));
2626

2727
const translationPreprocessor = require('@vue-storefront/i18n/scripts/translation.preprocessor.js')
2828
translationPreprocessor(csvDirectories, config)
29+
30+
const tsconfig = require('../../tsconfig.json');
31+
tsconfig.compilerOptions.paths['theme/*'] = [
32+
`${themeRoot}/*`
33+
];
34+
35+
require('fs').writeFileSync('tsconfig.json', JSON.stringify(tsconfig, null, 2));

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
],
2121
"paths": {
2222
"core/*": ["core/*"],
23-
"theme/*": ["src/themes/default/*"], //needs testing with non-default theme!
23+
"theme/*": ["src/themes/default/*"],
2424
"core/modules/*": ["./core/modules/*"],
2525
"@vue-storefront/*": ["./"]
2626
},

0 commit comments

Comments
 (0)