Skip to content

Commit

Permalink
fix: Modify kkt config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Dec 30, 2019
1 parent a6c8a05 commit 0c7f902
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .kktrc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import path from 'path';
import { Configuration } from 'webpack';
import { OptionConf } from 'kkt/lib/config/webpack.config';

export const moduleScopePluginOpts = [
path.resolve(process.cwd(), 'data.json'),
Expand All @@ -7,3 +9,11 @@ export const moduleScopePluginOpts = [
export const loaderOneOf = [
[require.resolve('@kkt/loader-less'), {}],
];


export default (conf: Configuration, opts: OptionConf, webpack) => {
if (opts.isEnvProduction) {
conf.output.publicPath = './';
}
return conf;
}

0 comments on commit 0c7f902

Please sign in to comment.