Link Search Menu Expand Document

Applications without bundler

Table of contents

  1. Future improvements
  2. Next

While Radpack’s Webpack plugin makes life easier, applications without bundlers can benefit equally from radpack as well.

After you’ve exported shared dependencies, you can then consume those dependencies with the radpack loader.

Example

import radpack from 'radpack';

radpack.register(radpackUrl);

(async () => {
  const [export1, export2] = await radpack(['export1', 'export2']);

  console.log(`Hello ${export1} & ${export2}`);
})();

Future improvements

Eventually we hope to further improve the above use case by adding new plugin support, likely in babel, to permit mapping static and dynamic imports back to radpack for consistency with existing rollup and webpack plugins.

In the future the above example could potentially look more like:

Example

import export1 from 'export1';
import export2 from 'export2';

console.log(`Hello ${export1} & ${export2}`);

Next

See how testing with radpack works.