Skip to content

Commit

Permalink
using paths in tsconfig and vite.config to avoid use of module entry …
Browse files Browse the repository at this point in the history
…in package
  • Loading branch information
danice committed Feb 29, 2024
1 parent db76ce8 commit 539d081
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"noFallthroughCasesInSwitch": true
},
"paths": {
"packages/*": ["packages/*"]
"@materializecss/materialize": ["packages/materialize"],
},
"include": ["src"]
}
8 changes: 7 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ function getMenuItem(item) {

export default {
base: "./",
resolve: {
alias: {
'@materializecss/materialize/sass': path.resolve(__dirname, './packages/materialize/sass/'),
'@materializecss/materialize': path.resolve(__dirname, './packages/materialize/src/')
}
},
plugins: [
handlebars({
context(pagePath) {
Expand Down Expand Up @@ -87,4 +93,4 @@ export default {
),
},
},
};
};

0 comments on commit 539d081

Please sign in to comment.