@flatjs/evolve 2.1.0-next.7 → 2.1.0-next.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- import{join}from"path";import{mergeOptions}from"@flatjs/common";import{devReactFastRefresh}from"../constants.js";import{normalizeEvolveEntryName}from"./normalize-entry-map.js";export function splitToMultiCompilerConfigs(e,t,r,o=!1){const n=[];for(const[t,o]of Object.entries(e)){const e=normalizeEvolveEntryName(t,r.projectVirtualPath);n.push({[e]:o.entry})}return n.map((e=>{const r=Object.keys(e)[0];if(o){e[join(r,devReactFastRefresh.reactRefreshSetup)]=["@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js"]}return mergeOptions(t,{name:r,entry:e})}))}
1
+ import{dirname,join}from"path";import{searchPackageDir}from"@armit/package";import{mergeOptions,requireResolve}from"@flatjs/common";import{devReactFastRefresh}from"../constants.js";import{normalizeEvolveEntryName}from"./normalize-entry-map.js";export function splitToMultiCompilerConfigs(e,r,t,o=!1){const a=[];for(const[r,o]of Object.entries(e)){const e=normalizeEvolveEntryName(r,t.projectVirtualPath);a.push({[e]:o.entry})}return a.map((e=>{const t=Object.keys(e)[0];if(o){const r=join(t,devReactFastRefresh.reactRefreshSetup),o=requireResolve(import.meta.url,"@pmmmwh/react-refresh-webpack-plugin"),a=searchPackageDir({cwd:dirname(o)});if(!a)throw new Error("react-refresh-webpack-plugin package directory not found");e[r]=[join(a,"/client/ReactRefreshEntry.js")]}return mergeOptions(r,{name:t,entry:e})}))}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatjs/evolve",
3
- "version": "2.1.0-next.7",
3
+ "version": "2.1.0-next.8",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {