@flatjs/evolve 1.8.1-next.26 → 1.8.1-next.27
Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{logger}from"@flatjs/common";import ReactRefreshWebpackPlugin from"@pmmmwh/react-refresh-webpack-plugin";import CaseSensitivePathsPlugin from"case-sensitive-paths-webpack-plugin";import ForkTsCheckerWebpackPlugin from"fork-ts-checker-webpack-plugin";import MiniCssExtractPlugin from"mini-css-extract-plugin";import{BundleAnalyzerPlugin}from"webpack-bundle-analyzer";import{enableBundleHashNameForModule}from"../helpers/enable-bundle-hashname-for-module.js";import{getBundleFileName}from"../helpers/get-bundle-file-name.js";import{shouldEnableReactFastRefresh}from"../helpers/should-enable-react-fast-refresh.js";import{createCleanWebpackPlugin}from"../plugins/clean-webpack/index.js";import{createModuleFederationPlugin}from"../plugins/module-federation/index.js";import{createHtmlPlugins}from"../plugins/multi-html/index.js";export const createPlugins=(e,n,
|
1
|
+
import{logger}from"@flatjs/common";import ReactRefreshWebpackPlugin from"@pmmmwh/react-refresh-webpack-plugin";import CaseSensitivePathsPlugin from"case-sensitive-paths-webpack-plugin";import ForkTsCheckerWebpackPlugin from"fork-ts-checker-webpack-plugin";import MiniCssExtractPlugin from"mini-css-extract-plugin";import{BundleAnalyzerPlugin}from"webpack-bundle-analyzer";import{moduleName}from"../constants.js";import{enableBundleHashNameForModule}from"../helpers/enable-bundle-hashname-for-module.js";import{getBundleFileName}from"../helpers/get-bundle-file-name.js";import{shouldEnableReactFastRefresh}from"../helpers/should-enable-react-fast-refresh.js";import{createCleanWebpackPlugin}from"../plugins/clean-webpack/index.js";import{createModuleFederationPlugin}from"../plugins/module-federation/index.js";import{createHtmlPlugins}from"../plugins/multi-html/index.js";export const createPlugins=(e,n,r)=>{const[a,s]=n,t=enableBundleHashNameForModule(r,s?.options),l=[new CaseSensitivePathsPlugin,new MiniCssExtractPlugin({filename:`[name]/${getBundleFileName("css",e,t)}`,chunkFilename:"[id].[contenthash].css"}),...createCleanWebpackPlugin(e,n,r),...createModuleFederationPlugin(e,n,r),...createHtmlPlugins(e,n,r)],{analyzer:i,loaderOptions:o,webpack:c}=r;if(o.runTsChecker){const r=(n[1].entry||[]).reduce(((e,n)=>{const r=/\.(?:ts|tsx|js|jsx)$/.test(n)?[n]:[n+".ts",n+".tsx"];return e.concat(r)}),[]);logger.debug(`ForkTsCheckerWebpackPlugin: include: ${JSON.stringify(r)}`,moduleName),l.push(new ForkTsCheckerWebpackPlugin({async:e,typescript:{memoryLimit:8192,configOverwrite:{include:r}}}))}i&&l.push(new BundleAnalyzerPlugin({analyzerPort:"auto",analyzerMode:"server",...i}));const u=shouldEnableReactFastRefresh(e,n,r);u&&l.push(new ReactRefreshWebpackPlugin({overlay:!1})),!u&&e&&logger.warn(`The HMR has disabled cause of ("${a}":"moduleFederation")`);const m=c?.plugins||[];return l.concat(m)};
|