@moneko/core 3.0.0-beta.0 → 3.0.0-beta.2
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.
- package/build/webpack.dev.js +1 -1
- package/package.json +1 -1
package/build/webpack.dev.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{HotModuleReplacementPlugin as e}from"webpack";import{merge as r}from"webpack-merge";import{CONFIG as o}from"./common";import{hasPkg as t}from"./has-pkg";import{hasReact as n}from"./process-env";import{getIPAdress as i,resolveProgramPath as s}from"./utils";import p from"./webpack.common";var a=require("@soda/friendly-errors-webpack-plugin"),l=require("chalk"),c=require("portfinder").getPort,m=t("@moneko/mock"),d=m?require("@moneko/mock").default:null,v=n?require("@pmmmwh/react-refresh-webpack-plugin").default:null,u=!1;o.cacheDirectory&&(u={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:o.cacheDirectory});var h=!1===o.devtool||o.devtool?o.devtool:"eval-cheap-module-source-map",f=new Promise(function(t){c({port:o.devServer.port,stopPort:9999},function(c,f){var w=[];o.devServer.port!==f&&w.push("Port "+l.yellow(o.devServer.port)+" is in use, trying "+l.green(f)+" instead"),o.devServer.port=f;var g="/"===o.routeBaseName,k=o.devServer.https?"https:":"http:",y=g?"":o.routeBaseName,S=r(p,{devtool:h,mode:"development",cache:u,devServer:{headers:{"Access-Control-Allow-Origin":"*"},compress:o.devServer.compress,host:"0.0.0.0",port:f,historyApiFallback:g||{index:y,disableDotRule:!0},https:o.devServer.https,proxy:o.proxy,allowedHosts:o.devServer.allowedHosts,client:{progress:!1,logging:"info",overlay:!1},static:{watch:{ignored:function(e){return e.endsWith(".d.ts")}}},setupMiddlewares:function(e,r){if(!r)throw Error("webpack-dev-server is not defined");return r.app&&m&&d(r.app,s("mock/")),e},open:!1,hot:!0},plugins:[new e,n&&new v,new a({compilationSuccessInfo:{messages:["You application is running here:\n\n local: "+l.cyan(k+"//"+o.devServer.host+":"+f+y)+"\n network: "+l.cyan(k+"//"+i()+":"+f+y)],notes:w},clearConsole:!0})].filter(Boolean)});t(S)})});export default f;
|