malinajs 0.7.2-a3 → 0.7.2-a4

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) => {
@@ -106,6 +121,7 @@ async function esbuild(options={}){
106
121
  outfile: 'public/bundle.js',
107
122
  minify: true,
108
123
  bundle: true,
124
+ platform: 'node',
109
125
  plugins: [malinaPlugin()],
110
126
  ...esbuildConfig,
111
127
  ...options
package/malina.js CHANGED
@@ -6634,7 +6634,7 @@
6634
6634
  return { event, fn, rootModifier };
6635
6635
  }
6636
6636
 
6637
- const version = '0.7.2-a3';
6637
+ const version = '0.7.2-a4';
6638
6638
 
6639
6639
 
6640
6640
  async function compile(source, config = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "malinajs",
3
- "version": "0.7.2-a3",
3
+ "version": "0.7.2-a4",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "prepare": "npm run build",