@rettangoli/fe 0.0.7-rc13 → 0.0.7-rc15
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/package.json +1 -1
- package/src/cli/watch.js +8 -5
- package/src/createComponent.js +4 -1
package/package.json
CHANGED
package/src/cli/watch.js
CHANGED
|
@@ -64,16 +64,19 @@ async function startViteServer(options) {
|
|
|
64
64
|
const startWatching = async (options) => {
|
|
65
65
|
const { dirs = ['src'], port = 3001 } = options;
|
|
66
66
|
|
|
67
|
-
//
|
|
68
|
-
|
|
69
|
-
await buildRettangoliFrontend({
|
|
67
|
+
// Set development mode for all builds in watch mode
|
|
68
|
+
const watchOptions = {
|
|
70
69
|
development: true,
|
|
71
70
|
...options
|
|
72
|
-
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// Do initial build with all directories
|
|
74
|
+
console.log('Starting initial build...');
|
|
75
|
+
await buildRettangoliFrontend(watchOptions);
|
|
73
76
|
console.log('Initial build complete');
|
|
74
77
|
|
|
75
78
|
dirs.forEach(dir => {
|
|
76
|
-
setupWatcher(dir,
|
|
79
|
+
setupWatcher(dir, watchOptions);
|
|
77
80
|
});
|
|
78
81
|
|
|
79
82
|
startViteServer({ port, outfile: options.outfile });
|
package/src/createComponent.js
CHANGED
|
@@ -348,7 +348,10 @@ class BaseComponent extends HTMLElement {
|
|
|
348
348
|
if (oldValue !== newValue && this.render) {
|
|
349
349
|
// Call handleOnUpdate if it exists
|
|
350
350
|
if (this.handlers?.handleOnUpdate) {
|
|
351
|
-
const changes = {
|
|
351
|
+
const changes = {
|
|
352
|
+
oldAttrs: { [name]: oldValue },
|
|
353
|
+
newAttrs: { [name]: newValue }
|
|
354
|
+
};
|
|
352
355
|
const deps = {
|
|
353
356
|
...this.deps,
|
|
354
357
|
refIds: this.refIds,
|