Skip to content

Commit 50109cb

Browse files
committed
chore: modify kktrc config.
1 parent 021a1cb commit 50109cb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.kktrc.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import rawModules from '@kkt/raw-modules';
66
import scopePluginOptions from '@kkt/scope-plugin-options';
77
import pkg from './package.json';
88

9-
export default (conf: Configuration, env: string, options: LoaderConfOptions) => {
9+
export default (conf: Configuration, env: 'production' | 'development', options: LoaderConfOptions) => {
1010
conf = lessModules(conf, env, options);
1111
conf = rawModules(conf, env, { ...options });
1212
conf = scopePluginOptions(conf, env, {
@@ -19,6 +19,8 @@ export default (conf: Configuration, env: string, options: LoaderConfOptions) =>
1919
conf.plugins!.push(new webpack.DefinePlugin({
2020
VERSION: JSON.stringify(pkg.version),
2121
}));
22-
conf.output = { ...conf.output, publicPath: './' }
22+
if (env === 'production') {
23+
conf.output = { ...conf.output, publicPath: './' }
24+
}
2325
return conf;
2426
}

0 commit comments

Comments
 (0)