diff --git a/create-kkt-ssr.html b/create-kkt-ssr.html index 64c05c7..eed3522 100644 --- a/create-kkt-ssr.html +++ b/create-kkt-ssr.html @@ -886,31 +886,30 @@
import { restWebpackManifestPlugin, getRemoveHtmlTemp, SSRWebpackRunPlugin } from '@kkt/ssr/lib/plugins';
+ import pluginLess from "@kkt/plugin-less"
-export default (conf, evn) => {
- // client ,
- if (!options.bundle) {
- conf.plugins.push(new SSRWebpackRunPlugin());
- conf.plugins = getRemoveHtmlTemp(conf.plugins)
- conf = restWebpackManifestPlugin(conf);
- }
- conf.module.exprContextCritical = false;
- return conf;
+export default {
+ overridesCommonWebpack: (conf, env, options) => {
+ const newConfig = pluginLess(conf, {
+ target: conf.target==="node14"?"node":"web",
+ env,
+ paths: options.paths
+ })
+ return newConfig
+ },
};
-
diff --git a/index.html b/index.html
index 5097a12..f9513dd 100644
--- a/index.html
+++ b/index.html
@@ -886,31 +886,30 @@ import { restWebpackManifestPlugin, getRemoveHtmlTemp, SSRWebpackRunPlugin } from '@kkt/ssr/lib/plugins';
+ import pluginLess from "@kkt/plugin-less"
-export default (conf, evn) => {
- // client ,
- if (!options.bundle) {
- conf.plugins.push(new SSRWebpackRunPlugin());
- conf.plugins = getRemoveHtmlTemp(conf.plugins)
- conf = restWebpackManifestPlugin(conf);
- }
- conf.module.exprContextCritical = false;
- return conf;
+export default {
+ overridesCommonWebpack: (conf, env, options) => {
+ const newConfig = pluginLess(conf, {
+ target: conf.target==="node14"?"node":"web",
+ env,
+ paths: options.paths
+ })
+ return newConfig
+ },
};
-
diff --git a/zip/basic-plugins.zip b/zip/basic-plugins.zip
index 2a71c3a..49c78b1 100644
Binary files a/zip/basic-plugins.zip and b/zip/basic-plugins.zip differ
diff --git a/zip/basic-routes-rematch-new.zip b/zip/basic-routes-rematch-new.zip
index 8ff9e72..453d152 100644
Binary files a/zip/basic-routes-rematch-new.zip and b/zip/basic-routes-rematch-new.zip differ
diff --git a/zip/basic-routes.zip b/zip/basic-routes.zip
index fb1b257..e01658d 100644
Binary files a/zip/basic-routes.zip and b/zip/basic-routes.zip differ
diff --git a/zip/basic.zip b/zip/basic.zip
index bd6ee37..5078b01 100644
Binary files a/zip/basic.zip and b/zip/basic.zip differ
diff --git a/zip/react-router-rematch.zip b/zip/react-router-rematch.zip
index ec8eeb8..9027955 100644
Binary files a/zip/react-router-rematch.zip and b/zip/react-router-rematch.zip differ