rebuildjs 0.44.2 → 0.46.0

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.
@@ -0,0 +1 @@
1
+ export * from '../any/index.js'
@@ -0,0 +1 @@
1
+ export * from '../any/index.js'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rebuildjs",
3
- "version": "0.44.2",
3
+ "version": "0.46.0",
4
4
  "description": "Reactive esbuild...simple hackable alternative to vite for Multi Page Apps",
5
5
  "keywords": [
6
6
  "reactive",
@@ -28,7 +28,8 @@
28
28
  "*.json",
29
29
  "_fixtures",
30
30
  "any",
31
- "file_types",
31
+ "browser",
32
+ "types",
32
33
  "server"
33
34
  ],
34
35
  "exports": {
@@ -42,8 +43,13 @@
42
43
  "default": "./any/index.js",
43
44
  "module": "./any/index.js"
44
45
  },
45
- "./file_types": {
46
- "types": "./file_types/index.d.ts"
46
+ "./browser": {
47
+ "types": "./browser/index.d.ts",
48
+ "default": "./browser/index.js",
49
+ "module": "./browser/index.js"
50
+ },
51
+ "./types": {
52
+ "types": "./types/index.d.ts"
47
53
  },
48
54
  "./server": {
49
55
  "types": "./server/index.d.ts",
@@ -148,6 +148,37 @@ export function rebuildjs__ready__wait(timeout) {
148
148
  ready=>ready,
149
149
  timeout ?? 5000)
150
150
  }
151
+ export const default_loader = {
152
+ '.aac': 'file',
153
+ '.apng': 'file',
154
+ '.avif': 'file',
155
+ '.eot': 'file',
156
+ '.flac': 'file',
157
+ '.gif': 'file',
158
+ '.ico': 'file',
159
+ '.jfif': 'file',
160
+ '.jpeg': 'file',
161
+ '.jpg': 'file',
162
+ '.mov': 'file',
163
+ '.mp3': 'file',
164
+ '.mp4': 'file',
165
+ '.ogg': 'file',
166
+ '.opus': 'file',
167
+ '.otf': 'file',
168
+ '.pdf': 'file',
169
+ '.pjp': 'file',
170
+ '.pjpeg': 'file',
171
+ '.png': 'file',
172
+ '.svg': 'file',
173
+ '.ttf': 'file',
174
+ '.wav': 'file',
175
+ '.webm': 'file',
176
+ '.webmanifest': 'file',
177
+ '.webp': 'file',
178
+ '.woff': 'file',
179
+ '.woff2': 'file',
180
+ '.txt': 'text',
181
+ }
151
182
  /**
152
183
  * @param {import('esbuild').Plugin}config
153
184
  * @returns {Promise<void>}
@@ -181,37 +212,7 @@ export async function rebuildjs_browser__build(config) {
181
212
  treeShaking: true,
182
213
  minify: is_prod_(app_ctx),
183
214
  sourcemap: 'external',
184
- loader: {
185
- '.aac': 'file',
186
- '.apng': 'file',
187
- '.avif': 'file',
188
- '.eot': 'file',
189
- '.flac': 'file',
190
- '.gif': 'file',
191
- '.ico': 'file',
192
- '.jfif': 'file',
193
- '.jpeg': 'file',
194
- '.jpg': 'file',
195
- '.mov': 'file',
196
- '.mp3': 'file',
197
- '.mp4': 'file',
198
- '.ogg': 'file',
199
- '.opus': 'file',
200
- '.otf': 'file',
201
- '.pdf': 'file',
202
- '.pjp': 'file',
203
- '.pjpeg': 'file',
204
- '.png': 'file',
205
- '.svg': 'file',
206
- '.ttf': 'file',
207
- '.wav': 'file',
208
- '.webm': 'file',
209
- '.webmanifest': 'file',
210
- '.webp': 'file',
211
- '.woff': 'file',
212
- '.woff2': 'file',
213
- '.txt': 'text',
214
- },
215
+ loader: default_loader,
215
216
  ...esbuild__config,
216
217
  entryPoints,
217
218
  format: 'esm',
@@ -261,6 +262,7 @@ export async function rebuildjs_server__build(config) {
261
262
  treeShaking: true,
262
263
  minify: is_prod_(app_ctx),
263
264
  sourcemap: 'external',
265
+ loader: default_loader,
264
266
  ...esbuild__config,
265
267
  entryPoints,
266
268
  format: 'esm',
File without changes