@csedl/svelte-on-rails 13.0.0 → 13.0.1
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/README.md +6 -1
- package/package.json +1 -1
- package/src/ssr/render.js +1 -0
package/README.md
CHANGED
|
@@ -9,9 +9,14 @@ npm i @csedl/svelte-on-rails
|
|
|
9
9
|
Add to your entrypoint file, like `application.js`
|
|
10
10
|
|
|
11
11
|
```javascript
|
|
12
|
-
import '@csedl/svelte-on-rails';
|
|
12
|
+
import {SvelteOnRails} from '@csedl/svelte-on-rails/init';
|
|
13
|
+
SvelteOnRails.start();
|
|
13
14
|
```
|
|
14
15
|
|
|
16
|
+
## Options
|
|
17
|
+
|
|
18
|
+
Run it with intensive logging: `SvelteOnRails.start({debug: true});`
|
|
19
|
+
|
|
15
20
|
## What it does
|
|
16
21
|
|
|
17
22
|
- It includes a stimulus controller that handles the initializing event of the svelte component,
|
package/package.json
CHANGED
package/src/ssr/render.js
CHANGED
|
@@ -9,6 +9,7 @@ const compiledComponentPath = process.argv[2];
|
|
|
9
9
|
try {
|
|
10
10
|
console.log(`Awaiting load component: ${compiledComponentPath}`);
|
|
11
11
|
const module = await import(`file://${compiledComponentPath}`);
|
|
12
|
+
console.log(`Loaded module typeof: ${typeof module}`);
|
|
12
13
|
|
|
13
14
|
const compiledComponent = module.default;
|
|
14
15
|
if (!compiledComponent) {
|