-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(icons-scripts): generate es6 output in same level with es5 (#901)
Сейчас ES6 билд генерит файлы по вложенности на уровень ниже, но в ts файлах, которые сгенерированы для ассетов, у нас уже стоит путь чувствительный к изменению вложенности. Теперь файлы для es6 генерятся в отдельной папке на уровне с билдом es5, причины выноса в отдельную папку: 1. Была идея класть es6 файлы рядом c es5 но с расширением mjs: ``` icon/test.js icon/test.mjs index.js index.mjs ``` Но тогда при таком подходе контент js файлов должен иметь js расширения в импортах, mjs также - relative путь без расширения не подходит, потому что webpack например не понимает как такой кейс резолвить и выбрасывает ошибку. Отдельно собрать через tsc, либо swc код с проставленным расширением сейчас нельзя. 2. Вынести es5 в dist/cjs, es6 в dist/es6 - в этом нет смысла, потому что все файлы должны лежать на уровне dist, без вложенности в подпапки. 3. Перегонять через babel - тогда смысла держать swc нет.
- Loading branch information
Showing
7 changed files
with
11 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
node_modules/ | ||
.DS_Store | ||
dist/ | ||
dist_es6/ | ||
ts/ | ||
packages/icons/docs/ | ||
.cache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
* | ||
!/dist/** | ||
!/dist_es6/** | ||
!/src/svg/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters