brk_rolldown 0.8.0

Fast JavaScript bundler in Rust, designed for the future of Vite
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import shared from './share';
import sharedJson from './share.json';
import assert from 'node:assert';

assert.strictEqual(shared, 'shared');
assert.deepStrictEqual(sharedJson, {});
console.log(shared, sharedJson);

import('./share').then((mod) => {
  // workaround for the String tag `Module`
  assert.deepEqual(JSON.parse(JSON.stringify(mod)), { default: 'shared' });
  console.log(mod);
});
import('./share.json').then((mod) => {
  // workaround for the String tag `Module`
  assert.deepEqual(JSON.parse(JSON.stringify(mod)), { default: {} });
  console.log(mod);
});