@platformatic/remix 2.44.0 → 2.44.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.
Files changed (3) hide show
  1. package/index.js +21 -19
  2. package/package.json +7 -7
  3. package/schema.json +1 -1
package/index.js CHANGED
@@ -39,12 +39,14 @@ export class RemixStackable extends ViteStackable {
39
39
  async init () {
40
40
  await super.init()
41
41
 
42
- this.#remix = resolve(dirname(resolvePackage(this.root, '@remix-run/dev')), '..')
43
- const remixPackage = JSON.parse(await readFile(resolve(this.#remix, 'package.json'), 'utf-8'))
42
+ if (!this.isProduction) {
43
+ this.#remix = resolve(dirname(resolvePackage(this.root, '@remix-run/dev')), '..')
44
+ const remixPackage = JSON.parse(await readFile(resolve(this.#remix, 'package.json'), 'utf-8'))
44
45
 
45
- /* c8 ignore next 3 */
46
- if (!satisfies(remixPackage.version, supportedVersions)) {
47
- throw new errors.UnsupportedVersion('@remix-run/dev', remixPackage.version, supportedVersions)
46
+ /* c8 ignore next 3 */
47
+ if (!satisfies(remixPackage.version, supportedVersions)) {
48
+ throw new errors.UnsupportedVersion('@remix-run/dev', remixPackage.version, supportedVersions)
49
+ }
48
50
  }
49
51
 
50
52
  const config = this.configManager.current
@@ -70,20 +72,7 @@ export class RemixStackable extends ViteStackable {
70
72
  return this.startWithCommand(command)
71
73
  }
72
74
 
73
- if (this.isProduction) {
74
- return this.#startProduction(listen)
75
- }
76
-
77
- const { preloadViteEsm } = await importFile(resolve(this.#remix, './dist/vite/import-vite-esm-sync.js'))
78
- await preloadViteEsm()
79
- await super.start({ listen })
80
-
81
- /* c8 ignore next 3 */
82
- if (!this._getVite().config.plugins.some(p => p.name === 'remix')) {
83
- this.logger.warn('Could not find Remix plugin in your Vite configuration. Continuing as plain Vite application.')
84
- }
85
-
86
- this._collectMetrics()
75
+ return this.isProduction ? this.#startProduction(listen) : this.#startDevelopment(listen)
87
76
  }
88
77
 
89
78
  async stop () {
@@ -160,6 +149,19 @@ export class RemixStackable extends ViteStackable {
160
149
  }
161
150
  }
162
151
 
152
+ async #startDevelopment (listen) {
153
+ const { preloadViteEsm } = await importFile(resolve(this.#remix, './dist/vite/import-vite-esm-sync.js'))
154
+ await preloadViteEsm()
155
+ await super.start({ listen })
156
+
157
+ /* c8 ignore next 3 */
158
+ if (!this._getVite().config.plugins.some(p => p.name === 'remix')) {
159
+ this.logger.warn('Could not find Remix plugin in your Vite configuration. Continuing as plain Vite application.')
160
+ }
161
+
162
+ this._collectMetrics()
163
+ }
164
+
163
165
  async #startProduction (listen) {
164
166
  // Listen if entrypoint
165
167
  if (this.#app && listen) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/remix",
3
- "version": "2.44.0",
3
+ "version": "2.44.1",
4
4
  "description": "Platformatic Remix Stackable",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -20,10 +20,10 @@
20
20
  "express": "^4.19.2",
21
21
  "pino-http": "^10.2.0",
22
22
  "semver": "^7.6.3",
23
- "@platformatic/basic": "2.44.0",
24
- "@platformatic/config": "2.44.0",
25
- "@platformatic/utils": "2.44.0",
26
- "@platformatic/vite": "2.44.0"
23
+ "@platformatic/config": "2.44.1",
24
+ "@platformatic/utils": "2.44.1",
25
+ "@platformatic/basic": "2.44.1",
26
+ "@platformatic/vite": "2.44.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@remix-run/dev": "^2.11.2",
@@ -40,8 +40,8 @@
40
40
  "typescript": "^5.5.4",
41
41
  "vite": "^5.4.2",
42
42
  "ws": "^8.18.0",
43
- "@platformatic/composer": "2.44.0",
44
- "@platformatic/service": "2.44.0"
43
+ "@platformatic/composer": "2.44.1",
44
+ "@platformatic/service": "2.44.1"
45
45
  },
46
46
  "scripts": {
47
47
  "test": "npm run lint && borp --concurrency=1 --no-timeout",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/remix/2.44.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/remix/2.44.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Remix Stackable",
5
5
  "type": "object",