chore(deps): update dependency kkt to v6.7.2
parent
6261dbd31d
commit
df587d4f28
@ -1,25 +1,26 @@
|
||||
import path from 'path';
|
||||
import webpack from 'webpack';
|
||||
import lessModules from '@kkt/less-modules';
|
||||
import rawModules from '@kkt/raw-modules';
|
||||
import scopePluginOptions from '@kkt/scope-plugin-options';
|
||||
import pkg from './package.json';
|
||||
|
||||
export const loaderOneOf = [
|
||||
require.resolve('@kkt/loader-less'),
|
||||
require.resolve('@kkt/loader-raw')
|
||||
];
|
||||
|
||||
export const moduleScopePluginOpts = [
|
||||
path.resolve(process.cwd(), 'README.md')
|
||||
];
|
||||
|
||||
export default (conf, opts, webpack) => {
|
||||
conf.output.path = path.resolve(process.cwd(), 'doc');
|
||||
const pkg = require(path.resolve(process.cwd(), 'package.json'));
|
||||
|
||||
export default (conf, env, options) => {
|
||||
conf = lessModules(conf, env, options);
|
||||
conf = rawModules(conf, env, options);
|
||||
conf = scopePluginOptions(conf, env, {
|
||||
...options,
|
||||
allowedFiles: [path.resolve(process.cwd(), 'README.md')],
|
||||
});
|
||||
// Get the project version.
|
||||
conf.plugins.push(
|
||||
new webpack.DefinePlugin({
|
||||
VERSION: JSON.stringify(pkg.version),
|
||||
})
|
||||
);
|
||||
|
||||
if (env === 'production') {
|
||||
conf.output = { ...conf.output, publicPath: 'doc' };
|
||||
}
|
||||
return conf;
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue