Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions .kktrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ import path from 'path';
import webpack from 'webpack';
import { LoaderConfOptions, WebpackConfiguration } from 'kkt';
import lessModules from '@kkt/less-modules';
import rawModules from '@kkt/raw-modules';
import scopePluginOptions from '@kkt/scope-plugin-options';
import pkg from './package.json';
import { mdCodeModulesLoader } from "markdown-react-code-preview-loader";
import { mdCodeModulesLoader } from 'markdown-react-code-preview-loader';

export default (conf: WebpackConfiguration, env: 'production' | 'development', options: LoaderConfOptions) => {
export default (
conf: WebpackConfiguration,
env: 'production' | 'development',
options: LoaderConfOptions
) => {
conf = lessModules(conf, env, options);
if (options.bundle) {
conf.output!.library = '@uiw/react-split';
Expand All @@ -20,19 +23,18 @@ export default (conf: WebpackConfiguration, env: 'production' | 'development', o
},
};
} else {
conf = rawModules(conf, env, { ...options });
conf = scopePluginOptions(conf, env, {
...options,
allowedFiles: [
path.resolve(process.cwd(), 'README.md')
]
allowedFiles: [path.resolve(process.cwd(), 'README.md')],
});
// Get the project version.
conf.plugins!.push(new webpack.DefinePlugin({
VERSION: JSON.stringify(pkg.version),
}));
conf.plugins!.push(
new webpack.DefinePlugin({
VERSION: JSON.stringify(pkg.version),
})
);
conf = mdCodeModulesLoader(conf);

if (env === 'production') {
conf.module!.exprContextCritical = false;
conf.output = { ...conf.output, publicPath: './' };
Expand Down Expand Up @@ -77,4 +79,4 @@ export default (conf: WebpackConfiguration, env: 'production' | 'development', o
}

return conf;
}
};
9 changes: 0 additions & 9 deletions website/Page.tsx

This file was deleted.