« first day (4500 days earlier)      last day (440 days later) » 

9:28 AM
I'm using Vite/Rollup with Vue. I'm trying to bundle my SPA app for production. I'm using a plugin to split the vendor bundle from my app code. So when I run npm run build It creates 4 files with chunk ids in them. When I'm serving my index.html file to someone that goes to my site, how do I get my index.html to import the correct/newest bundle chunks?
Is there like a plugin or something that will generate a new index.html file with the correct script tags and srcs or am I meant to first run the build command, then update my index.html, then push the changes to github and have it deploy from there?
This is what npm run build produces
public/build/manifest.json 0.54 kB
public/build/assets/app-1ed9b925.css 0.24 kB │ gzip: 0.14 kB
public/build/assets/app-6a6cfbe0.css 12.69 kB │ gzip: 3.26 kB
public/build/assets/app-1e651455.js 20.14 kB │ gzip: 6.29 kB
public/build/assets/vendor-0e7024e9.js 179.91 kB │ gzip: 62.27 kB
This is the order I believe I'm suppose to load the resources in.
<script src="/js/manifest.js"></script>
<script src="/js/vendor-0e7024e9.js"></script>
<script src="/js/app-1e651455.js"></script>
... then CSS
 
10:13 AM
Nvm I figured this out.
 
 
3 hours later…
1:19 PM
senior Typescript developer: type={"number" as "text"}
XD
 
That shouldn't even compile...
 
it does
it should as "as" is basically telling the compiler that the developer knows better
 
But it still complains about completely incompatible types.
 
could be the case, but apparently doesnt in my case
 
Oh. It doesn't Playground Link
 
1:23 PM
x as y in TS always gets translated to x in JS afaik
 
This is cursed.
 
but it solves my problem tho :D
I could do something normal like "number" as any
which is common for "pls shut up, compiler"
but this is funnier :D
 
This doesn't compile: Playground Link You can bypass it with a double assertion: Playground Link
Type assertions are useful in edge cases. For example at system boundaries when you get some unknown shape and want to verify it's a known one. Usually paired with a type guard or something that actually does the verification. But most type assertions outside these are probably wrong.
And the double assertions are almost guaranteed to be wrong. I cannot actually think of a legitimate reason to use them. I mostly know they exist because on SO there are questions every so often that go "I used 42 as any as string but it fails when I try .toUpperCase!!111!!"
 
in my case, I tried to add a <MaskedInput> around my <TextField> where the type is "number"
the properties that are passed to <MaskedInput> are forwarded to the <TextField>
but the type property on the props of <MaskedInput> does not allow "number" because it is not in their set of known types
but it is in the set of known types of <TextField>
 
*facepalm*
 
1:36 PM
there could have been an exhaustive switch on the value inside MaskedInput, but there wasnt so it works :D
usually, I only put type assertions on object or array literals
 
May I just say how much I'm starting to dislike the prop "drilling".
 
like const newList = [...list, {} as MyListItem]
drilling?
 
 
ah, props forwarding is drilling?
 
I'm quite proud. I learned the "drilling" term yesterday and I got to use it already :)
But yeah - forwarding props through components. Because you need it in component F but you can only get them from A, you need to provide them through out the entire chain A -> B -> C -> D -> E -> F
 
1:39 PM
its quite convenient, but it should always be better to have an innerProps: TProps property on the outer props
 
Btw, the diagram comes from this page on Vue. Describes an alternative which is "provides" which you'd use in A and then "inject" which is in F and this you skip the chain and more directly allows usage. I'm still not sure how good that solution is. Need to see it more in practice.
Yes, it would avoid the forwarding through the chain. But it's sort of "globals" for your components. And now you have to manage those.
 
generally speaking, dedicated forwarding props are always the better solution, but they do result in code that is difficult to copy and paste
 
 
4 hours later…
5:52 PM
posted on February 10, 2023 by Daniel Gagnon

The Beta channel is being updated to OS version: 15329.13.0, Browser version: 111.0.5563.14 for most ChromeOS devices. If you find new issues, please let us know one of the following waysFile a bugVisit our ChromeOS communitiesGeneral: Chromebook Help CommunityBeta Specific: ChromeOS Beta Help CommunityReport an issue or send feedback on ChromeInterested in switching channel

posted on February 10, 2023 by Srinivas Sista

 The dev channel has been updated to 112.0.5582.0 for Windows, Linux and Mac. A partial list of changes is available in the log. Interested in switching release channels? Find out how. If you find a new issue, please let us know by filing a bug. The community help forum is also a great place to reach out for help or learn about common issues. Srinivas SistaGoogle Chrome

 

« first day (4500 days earlier)      last day (440 days later) »