Skip to content

Instantly share code, notes, and snippets.

@NullVoxPopuli
NullVoxPopuli / Browsers can't handle large module graphs.md
Last active October 2, 2025 20:55
Problems with vite and http/2 in large apps

Much of the benefit of vite + http/2 is the ability to rely on cached requests of http/2 -- as in, turning off "disable cache" in the network tools.

However, when an app has to perform 10k network requests on boot, chrome and firefox error with:

I believe this is potentially related to limitations in maybe both the browser and the server

@NullVoxPopuli
NullVoxPopuli / minify-compress.js
Created May 24, 2024 15:23
min + gzip + brotli testing script
import fs from 'node:fs';
import path from 'node:path';
import { filesize } from 'filesize';
import { minify } from 'terser';
import { execa, execaCommand, $ } from 'execa';
import brotli from 'brotli';
const options = {
parse: {
html5_comments: false,

RFC#570: Background, motivation, reasoning.

Converting an addon to the v2/native format is described in detail here

NOTE: "v2 addons" are also known as "native packages", "native addons", "npm native", etc.


benefits tl;dr:

  • Vite compatible (along with other packagers, rollup, etc)

What's new since Octane?

All of this will be part of what makes up the next edition, Polaris (which is still being defined and explored)

import React from 'react';
export const Foo = <>
test {expression + expression} test
{[].map(item => {
return <div>{item}</div>
})}
<div></div>
@NullVoxPopuli
NullVoxPopuli / controllers.application\.js
Last active August 12, 2021 14:59
QP-Only Transition Bug Reproduction
import Controller from '@ember/controller';
import { action } from '@ember/object';
import { inject as service } from '@ember/service';
export default class ApplicationController extends Controller {
queryParams = ['test'];
appName = 'Ember Twiddle';
@service router;
@NullVoxPopuli
NullVoxPopuli / controllers.application\.js
Last active July 25, 2021 16:25
Each Behavior -- Removal
import Controller from '@ember/controller';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
export default class ApplicationController extends Controller {
@tracked records = freshArray();
@action addFirst() {
log('add:first, expect one each log');
this.records = [{ id: this.records.length + 1 }, ...this.records ];
<h2>Checkbox</h2>
<input
checked={{this.value}}
type='checkbox'
{{on 'input' this.handleInput}}
{{on 'change' this.handleChange}}
>
<button {{on 'click' this.changeValue}}>Change the value externally</button>