Skip to content

Commit

Permalink
fix treeshaking array (#1480)
Browse files Browse the repository at this point in the history
* fix treeshaking array

* fix treeshaking array

* imports to not use .component
  • Loading branch information
KonnorRogers authored Aug 1, 2023
1 parent 16f3e25 commit 81dfcc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion custom-elements-manifest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default {
//
const terms = [
{ from: /^src\//, to: '' }, // Strip the src/ prefix
{ from: /\.(t|j)sx?$/, to: '.js' } // Convert .ts to .js
{ from: /\.component.(t|j)sx?$/, to: '.js' } // Convert .ts to .js
];

mod.path = replace(mod.path, terms);
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
"./dist/shoelace.js",
"./dist/shoelace-autoloader.js",
"./dist/components/**/*.js",
"./dist/chunks/**/*.js",
"./dist/translations/**/*.*",
"./src/translations/**/*.*",
"*.css",
"// COMMENT: This monstrosity below isn't perfect, but its like 99% to get bundlers to recognize 'thing.component.ts' as having no side effects. Example: https://regexr.com/7grof",
"./dist/components/**/*((?<!(\\.component|\\.styles)))\\.js"
],
Expand Down

0 comments on commit 81dfcc2

Please sign in to comment.