Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Assets Build Tool (Assets Manager) #17262
base: main
Are you sure you want to change the base?
New Assets Build Tool (Assets Manager) #17262
Changes from 140 commits
b4d57c8
0a226e7
e0d37a9
0c7f561
4354f70
979fcf1
7857435
e045ae5
f475527
18ba519
b424cde
3314011
e476a06
c7325f3
e57bc54
88510d2
e5654ea
ab69a7b
0a3fc8f
3f75b7f
ab67333
c3e10e3
d93a0cb
ed0c52a
f854e18
6bec184
9e409c9
5d63fbc
1f5e8fa
7b97f88
d5bc9f9
b225478
5d6e58a
96225f6
e2ea2af
28a0c61
e74955a
cb54b23
99823ee
a0dc560
c77e701
8d5517b
119913b
4f71a9b
52c1b2b
2995718
e53a7ac
68c8202
074da60
e3d4cbf
10187bb
fd7c476
7b19fe8
0422ac6
3042b25
2fc2e86
10976af
2f47d39
e7c1afc
9048f64
f78da9c
142db4e
4795c60
ce09ff9
c5a0eac
8ea0719
ef59521
79a4125
5192ddb
23792df
9878aea
e8c9414
da4b149
cfa3af3
eaf8237
23650c7
627c918
6ebac66
743f9ba
5d4a1eb
86948be
3999163
782a8a2
6071ac5
7b3d8ea
f4adea5
dbfe1a9
42f5c7a
bdb9cfa
9f5d234
8d56b55
0021d56
803bf7e
a86a5a8
578d1cb
1c25005
9a5c043
2e075c6
cde492c
2835695
6aacce9
cad3e54
6d8e081
7b09bce
7c13411
35a108e
df9c4ab
5685a43
70dcfa6
8c366a1
cbe94c8
17cc0ed
7842aa4
100bb49
b8b584a
956d8d8
7dae9ad
dcf6f7c
ab5bf65
dfa9ba7
01dbe67
1fa84be
cb4ed6a
afa14c9
2f4ddb4
23199ad
7b39fad
bdbacaa
71fc261
cad9345
f480902
7ce57ce
407fa32
e617958
c40ea58
7a5449f
c4e740e
58bce09
716b0c9
8d47e13
5e4b9d3
fadd012
1c34040
c389b80
d086276
0ee6aed
358840e
24ed014
fbf2644
f760861
e094ad3
32bb473
2ad43ad
f36b07a
3d156e7
69981e6
5106d07
3db894c
e8a3973
8788273
1c9970f
d140670
76cd7c9
edcfc56
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got the same diff in all the staged files after running
![{27A84D7F-719D-40D4-83B3-475C0C367CD5}](https://private-user-images.githubusercontent.com/1976647/412658498-6af74175-9abf-4b96-ab54-79926764f235.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2OTIyMzgsIm5iZiI6MTczOTY5MTkzOCwicGF0aCI6Ii8xOTc2NjQ3LzQxMjY1ODQ5OC02YWY3NDE3NS05YWJmLTRiOTYtYWI1NC03OTkyNjc2NGYyMzUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTZUMDc0NTM4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MmQxZGIxZjk0NDcxYTNkNGY2MWRjMWI4OWU2NmIwZWY3M2RiZGI5YzY0ZDlkODdjMWQ4ZDI4YTUwYjU5Y2M5ZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.6LEiwX1_tUPb_gRjlefkflz4NqJWiSkpn-b_IK6UiB4)
watch
.And also:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, watch will create unminified assets. You should not commit these, the watcher is for developping only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not how I'd expect this to work, but rather that
watch
does the same asbuild
, i.e. it generates the end build output, but automatically on save. Likedotnet watch
. Our project does the same for static assets.The developer story needs to be streamlined here, with a quick and simple inner loop, and these tools shouldn't generate any changes which are not gitignored but mustn't be committed, that's confusing.
I can see that in order to be fast,
watch
potentially does less thanbuild
, that's OK, but then the files it generates which are not needed should be gitignored (the ones indist
, although why are those generated in the first place?). If indeed, then then it should only update the non-minified debug version of the files, and leave the minified ones untouched (yesterday we talked about potentially only using minified files with source maps, what we can do, but we don't need to jump that gun right now). Thenbuild
can generate both debug and minified. And all of this needs to be told to the contributors, see #17262 (comment).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The watcher needs to output something really quick on save. So, by design these compilers will never minimize and optimize the code. That's how these tools works. They have a production and developper mode which are triggered when using watch or build with them.
Of course, you never commit a watch to your repository.
I can take a look at Parcel configurations but right now I don't think we could output unminified/un-optimized assets along with a minified/optimized asset on each build. Parcel has a "mode" config parameter that is set to either development or production which will create either an unminified or minified asset. And when we do build it will set the mode to production. When we watch it will set it to development. Else, I don't think there is any other way to tell it to create a minified asset unless doing it manually with another Parcel process. But that will add up compilation time while the tool always worked like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe Vite and Webpack would work because we have a configuration file that is editable with them. But that's up to the dev at that point.
Basically, what I'm saying is that these use cases are all possible and even if we are trying to restrict something here it will probably eventually be worst.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the ability to do
yarn watch
without specifying the asset name withyarn watch -n modulename
Else it was doing a watch all which is not a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added docs about this too.