rebuildjs 0.10.2 → 0.10.4
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/app/index.js +1 -1
- package/build/index.js +8 -1
- package/package.json +1 -1
package/app/index.js
CHANGED
|
@@ -68,7 +68,7 @@ export const [
|
|
|
68
68
|
browser__relative_path$_,
|
|
69
69
|
browser__relative_path_,
|
|
70
70
|
] = be_memo_pair_(ctx=>
|
|
71
|
-
join('dist', is_prod_(ctx) ? 'browser' : '
|
|
71
|
+
join('dist', is_prod_(ctx) ? 'browser' : 'dev-browser'),
|
|
72
72
|
{ ...app_ctx__be_config, is: 'browser_relative_path' })
|
|
73
73
|
export const [
|
|
74
74
|
browser_path$_,
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="./index.d.ts" />
|
|
2
|
+
import { file_exists_ } from '@ctx-core/fs'
|
|
2
3
|
/** @typedef {import('esbuild').BuildOptions}BuildOptions */
|
|
3
4
|
/** @typedef {import('esbuild').Plugin}Plugin */
|
|
4
5
|
import { writeFile } from '@ctx-core/monorepo'
|
|
@@ -150,10 +151,16 @@ export function rebuildjs__plugin_() {
|
|
|
150
151
|
server__input_path__set(middleware_ctx, input_path)
|
|
151
152
|
const cssBundle = server__cssBundle_(middleware_ctx)
|
|
152
153
|
if (cssBundle) {
|
|
153
|
-
|
|
154
|
+
const server__css = server__css_(middleware_ctx)
|
|
154
155
|
await link(
|
|
155
156
|
join(server_path_(app_ctx), server__css),
|
|
156
157
|
join(browser_path_(app_ctx), server__css))
|
|
158
|
+
const server__css_map = `${server__css}.map`
|
|
159
|
+
if (await file_exists_(join(server_path_(app_ctx), server__css_map))) {
|
|
160
|
+
await link(
|
|
161
|
+
join(server_path_(app_ctx), server__css_map),
|
|
162
|
+
join(browser_path_(app_ctx), server__css_map))
|
|
163
|
+
}
|
|
157
164
|
}
|
|
158
165
|
}
|
|
159
166
|
})
|