@moneko/core 3.0.0-beta.93 → 3.0.0-beta.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"webpack-virtual-modules";import{
|
|
1
|
+
import t from"webpack-virtual-modules";import{exampleModule as o,routesModule as e}from"./routes.js";import{resolveNodeModulesPath as i}from"./utils.js";export let vm;export default class{constructor(t){this.options=t}apply(r){(vm=new t({[e]:"export default []",[o]:"export default []"})).apply(r),r.hooks.compilation.tap("VirtualModulePlugin",()=>{for(let t in this.options)if(Object.prototype.hasOwnProperty.call(this.options,t)){let o=this.options[t];"string"==typeof o?vm.writeModule(i(t),o):vm.writeModule(i(t),`export default ${JSON.stringify(o)}`)}})}};
|
package/lib/virtual-modules.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{accessSync as o,constants as p}from"fs";import{join as
|
|
1
|
+
import{accessSync as o,constants as p}from"fs";import{join as a}from"path";import t from"./app.js";import{CONFIG as r}from"./common.js";import{coverage as e}from"./coverage.js";import{APPTYPE as l,PROGRAMPATH as m}from"./process-env.js";let c={...r.virtualModule,"@app":t,"@app/fallback":"export default null"};if(r.fallbackCompPath&&Object.assign(c,{"@app/fallback":`import Fallback from "${r.fallbackCompPath}";export default Fallback;`}),"library"===l){let t={};try{let r=a(m,"./site/mdx-scope.ts");o(r,p.R_OK),t='import scope from "@/mdx-scope";export default scope;'}catch(o){t={}}Object.assign(c,{"@app/coverage":e,"@app/mdx-scope":t})}export default c;
|