@uniweb/build 0.1.10 → 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 +18 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/build",
3
- "version": "0.1.10",
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
@@ -291,7 +292,23 @@ export async function defineSiteConfig(options = {}) {
291
292
  },
292
293
 
293
294
  optimizeDeps: {
294
- include: ['react', 'react-dom', 'react-dom/client', 'react-router-dom']
295
+ include: ['react', 'react-dom', 'react-dom/client', 'react-router-dom'],
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
+ }
295
312
  },
296
313
 
297
314
  ...restOptions