refactor(bgm): use virtual: module specifiers
Rename the plugin's virtual modules to virtual:bgm/packages and virtual:bgm/package/<id> so they read as plugin-provided modules rather than real packages. Update the unit and build integration tests.
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import harbor from 'bgm/harbor';
|
||||
import harbor from 'virtual:bgm/package/harbor';
|
||||
import packages from 'virtual:bgm/packages';
|
||||
|
||||
// Re-export the package data so the test can assert the bundled output.
|
||||
export const parts = [...harbor.parts.keys()];
|
||||
export const surfaces = [...harbor.surfaces.keys()];
|
||||
export const setups = [...harbor.setups.keys()];
|
||||
export const title = harbor.meta.title;
|
||||
export const allIds = packages.map((p) => p.meta.id);
|
||||
|
||||
console.log(title, parts, surfaces, setups);
|
||||
console.log(title, parts, surfaces, setups, allIds);
|
||||
|
||||
Reference in New Issue
Block a user