Skip to content

Commit 8bd7b3b

Browse files
committed
chore: update kkt config.
1 parent 8e724a6 commit 8bd7b3b

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

.kktrc.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import path from 'path';
22
import webpack, {Configuration} from 'webpack';
3-
import { DevServerConfigFunction, LoaderConfOptions } from 'kkt';
4-
import WebpackDevServer from 'webpack-dev-server';
3+
import { LoaderConfOptions } from 'kkt';
54
import lessModules from '@kkt/less-modules';
65
import rawModules from '@kkt/raw-modules';
76
import scopePluginOptions from '@kkt/scope-plugin-options';
@@ -20,14 +19,8 @@ export default (conf: Configuration, env: string, options: LoaderConfOptions) =>
2019
conf.plugins!.push(new webpack.DefinePlugin({
2120
VERSION: JSON.stringify(pkg.version),
2221
}));
23-
conf.output = { ...conf.output, publicPath: './' }
22+
if (env === 'production') {
23+
conf.output = { ...conf.output, publicPath: './' }
24+
}
2425
return conf;
2526
}
26-
27-
28-
export const devServer = (configFunction: DevServerConfigFunction) => (proxy: WebpackDevServer.ProxyConfigArrayItem[], allowedHost: string) => {
29-
// Create the default config by calling configFunction with the proxy/allowedHost parameters
30-
const config = configFunction(proxy, allowedHost);
31-
// Return your customised Webpack Development Server config.
32-
return config;
33-
}

0 commit comments

Comments
 (0)