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 +18 -2
- package/malina.js +1 -1
- package/package.json +1 -1
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