When building a project, it's very likely that we will install third-party packages from npm to offload some tasks. On that topic, we know there are two major types of dependencies: dependencies (prod) and devDependencies (dev). In our package.json, it might look something like this:| Anthony Fu
日本語| Anthony Fu
As you might have noticed, I added a photos page on this site recently. It's something I wanted to do for a very long time but always procrastinated on.| Anthony Fu
Proposal for an extended Semantic Versioning called Epoch SemVer to provide more granular versioning information to users.| Anthony Fu
If you want to debug the bundling performance of your Nuxt app to generate CPU profiles.| Anthony Fu
Go to nuxt.com and read the full post.| Anthony Fu
An initiative to support open-source ecosystem by Anthony Fu.| Anthony Fu
Go to nuxt.com and read the full article.| Anthony Fu
Go to eslint.org and read the full announcement.| Anthony Fu
Anthony's Roads to Open Source - The Set Theory - React Paris 2024| Anthony Fu
Some of my thoughts on my mental health during my journey in Open Source| Anthony Fu
Go to nuxt.com and read the full article.| Anthony Fu
The methodology behind Shiki Magic Move.| Anthony Fu
Anthony's Roads to Open Source - The Progressive Path - Vue Amsterdam| Anthony Fu
Here is an example of using TwoSlash with Shiki:| Anthony Fu
[!TIP]| Anthony Fu
Go to nuxt.com and read the full announcement.| Anthony Fu
Anthony's Roads to Open Source - The Set Theory - Vue Fes Japan 2023| Anthony Fu
Now, and the Future of Nuxt Devtools - Nuxt Nation 2023| Anthony Fu
Anthony's Roads to Open Source - The Set Theory - ViteConf 2023| Anthony Fu
I recently replaced the logo on the top left corner with an animated SVG:| Anthony Fu
If you tried to use pnpm to install a project on an external disk, it may not work right away because pnpm is heavily relying on symlinks, which doesn't work cross mount points. To workaround this, you can add the following config to your .npmrc:| Anthony Fu
[[toc]]| Anthony Fu
[[toc]]| Anthony Fu
[[toc]]| Anthony Fu
Development Experience with DevTools - StrasbourgJS 2023| Anthony Fu
Manage GitHub Notifications - GitHub Maintainer Summit 2023| Anthony Fu
Adding an elegant sliding enter animation to your blog.| Anthony Fu
Go to nuxt.com and read the full announcement.| Anthony Fu
You probably don't need it usually, but in case you want to break lines programmatically in JavaScript, here is my lazy man's solution:| Anthony Fu
Development Experience with Nuxt - Vue Amsterdam 2023| Anthony Fu
Patterns of VueUse - Vue Fes Japan 2022| Anthony Fu
Vite, the on-demand DX - ViteConf 2022| Anthony Fu
The journey of how we made development time SSR working on Nuxt with Vite| Anthony Fu
The reason why I don't use Prettier in my projects.| Anthony Fu
My thoughts on why reproductions are important in open source.| Anthony Fu
Introduction to Vitest - Vue.js Nation 2022| Anthony Fu
A short tutorial of shipping both ESM and CJS dual formats in a single NPM package.| Anthony Fu
The icon solution in pure CSS.| Anthony Fu
Let's take a step back and reimagine what's atomic CSS could be in the best.| Anthony Fu
New Ways to Vue - Vue.js Live London 2021| Anthony Fu
Credit to GitHub Copilot.| Anthony Fu
My journey with icons and the solutions I made along the way| Anthony Fu
In ESM, you might found your old friends __dirname and __filename are no longer available. When you search for solutions, you will find that you will need to parse import.meta.url to get the equivalents. While most of the solutions only show you the way to get them in ESM only, If you like me, who write modules in TypeScript and transpile to both CJS and ESM at the same time using tools like tsup. Here is the isomorphic solution:| Anthony Fu
You might found GitHub sometimes shows you a commit with multiple authors. This is commonly happening in squashed pull requests when multiple people are involved with the reviewing and made suggestions or changes. In that situation, GitHub will automatically inject the Co-authored-by: to the commit message. This is a great way to give contributors credits while keeping the commit history clean.| Anthony Fu
Notes about the caveat when using async functions in Vue Composition API.| Anthony Fu
When you want to get the real file path of a certain package, you could use require.resolve to fetch their main entry path.| Anthony Fu
async / await in ES7 is truly a life-saver for the JavaScript world. It allows you to avoid callback hell in your code and make it more readable. However, a common pitfall is that when you await a huge asynchronous task that takes very long time, it blocks the following code and could potentially make your app slow.| Anthony Fu
[[toc]]| Anthony Fu
Slides & transcript for my talk at VueDay 2021| Anthony Fu
This is the transcript of my talk at Vue Beijing| Anthony Fu
My sincere apologies to everyone involved.| Anthony Fu
Configurations can be quite complex, and sometimes you may want to utilize the great type checking that TypeScript provided. Change your xxx.config.js to xxx.config.ts is not an ideal solutions as you will need to have a Node.js register involved to transpile it into JavaScript and some tools might not support doing that way. Fortunately, TypeScript also support type check in plain JavaScript file with JSDoc. Here is an example of Webpack config with type checks:| Anthony Fu
Wish this is the end.| Anthony Fu
I didn't know that you can type provide() and inject() elegantly until I watched Thorsten Lünborg's talk on Vue Amsterdam.| Anthony Fu
There is currently no API to access colors of current theme in VS Code Extensions, nor the meta information of them. It frustrated me for a long while, until today I came up with a dirty but working solution.| Anthony Fu
When you build multiple entries in a single package, you exports them with exports syntax. Like| Anthony Fu
In JavaScript, single quotes('') and double quotes("") are interchangeable. With ES6, we now even have backticks(``) for template literals. When you want to write a quick script to find all the strings without introducing a heavy parser, you may think about using RegExp. For example, you can have:| Anthony Fu
When you need to detect if a string contains Chinese characters, you would commonly think about doing it will RegExp, or grab a ready-to-use package on npm.| Anthony Fu
Domains Redirects| Anthony Fu
My site is now powered by Vite!| Anthony Fu
Prefer object destructure or array? Can we support both?| Anthony Fu
A brief intro of how it works and a guide to implementing the (missing) `watch` on your own.| Anthony Fu
To solve the pain I faced in using icons for the web, I built several tools to make the DX better.| Anthony Fu
Try Vue Demi!| Anthony Fu
Note: This is my personal notes/tips for migrating to Vue 3 and will be updated overtime. Please refer to the official docs for the complete changelog.| Anthony Fu
[[toc]]| Anthony Fu
Saw a tweet from Evan You about the hey.com mail service recently. I got interested in having a short and nice email address. My current one in Hotmail is just too long to even being spell out in talk. hey.com looks very nice but $99/year is not a very good deal to me. I decide to use my own domain for receiving emails.| Anthony Fu
The coloring problem in modern programming, and a proposal of a new approach| antfu.me