malinajs 0.7.2-a1 → 0.7.2-a10

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.
package/malina-esbuild.js CHANGED
@@ -59,10 +59,25 @@ function malinaPlugin(options={}){
59
59
  const cssModules = new Map();
60
60
 
61
61
  if(options.displayVersion !== false) console.log('! Malina.js', malina.version);
62
-
62
+
63
63
  return {
64
64
  name: 'malina-plugin',
65
- setup(build) {
65
+ setup(build) {
66
+ build.onResolve({ filter: /^malinajs$/ }, async (args) => {
67
+ const runtime = await build.resolve('malinajs/runtime.js', {resolveDir: args.resolveDir});
68
+ return {
69
+ path: runtime.path,
70
+ sideEffects: false
71
+ };
72
+ });
73
+
74
+ build.onResolve({ filter: /\.(xht|ma|html)$/ }, (arg) => {
75
+ return {
76
+ path: path.resolve(arg.resolveDir,arg.path),
77
+ sideEffects: false
78
+ }
79
+ });
80
+
66
81
  build.onLoad(
67
82
  { filter: /\.(xht|ma|html)$/ },
68
83
  async (args) => {