@uniweb/build 0.1.11 → 0.1.12

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/site/config.js +17 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/build",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Build tooling for the Uniweb Component Web Platform",
5
5
  "type": "module",
6
6
  "exports": {
@@ -131,6 +131,7 @@ function virtualEntryPlugin(foundationInfo, isRuntimeMode) {
131
131
 
132
132
  return {
133
133
  name: 'uniweb:virtual-entry',
134
+ enforce: 'pre',
134
135
  resolveId(id) {
135
136
  if (id === VIRTUAL_ENTRY_ID) {
136
137
  return RESOLVED_VIRTUAL_ENTRY_ID
@@ -292,7 +293,22 @@ export async function defineSiteConfig(options = {}) {
292
293
 
293
294
  optimizeDeps: {
294
295
  include: ['react', 'react-dom', 'react-dom/client', 'react-router-dom'],
295
- exclude: ['virtual:uniweb-site-entry']
296
+ exclude: ['virtual:uniweb-site-entry'],
297
+ esbuildOptions: {
298
+ plugins: [
299
+ {
300
+ name: 'virtual-entry-resolver',
301
+ setup(build) {
302
+ // Tell esbuild that virtual:uniweb-site-entry is external
303
+ // This prevents the "could not be resolved" error during dep scanning
304
+ build.onResolve({ filter: /^virtual:uniweb-site-entry$/ }, () => ({
305
+ path: 'virtual:uniweb-site-entry',
306
+ external: true
307
+ }))
308
+ }
309
+ }
310
+ ]
311
+ }
296
312
  },
297
313
 
298
314
  ...restOptions