Skip to content

Commit

Permalink
Merge branch 'next-29105/allow-ts-files-in-storefront' into 'trunk'
Browse files Browse the repository at this point in the history
NEXT-29105 - allow ts files in storefront

See merge request shopware/6/product/platform!11044
  • Loading branch information
tobiasberge committed Jul 10, 2023
2 parents 28039be + aed3073 commit a6157bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Allow typescript in the storefront
issue: NEXT-29105
---
# Storefront
* Added extension alias in webpack config for javascript files to check for typescript files first and then javascript files
3 changes: 3 additions & 0 deletions src/Storefront/Resources/app/storefront/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ let webpackConfig = {
],
resolve: {
extensions: [ '.ts', '.tsx', '.js', '.jsx', '.json', '.less', '.sass', '.scss', '.twig' ],
extensionAlias: {
'.js': ['.ts', '.js'],
},
modules: [
// statically add the storefront node_modules folder, so sw plugins can resolve it
path.resolve(__dirname, 'node_modules'),
Expand Down

0 comments on commit a6157bb

Please sign in to comment.