diff --git a/.kktrc.ts b/.kktrc.ts index d8c1dbc3..2a60bb18 100644 --- a/.kktrc.ts +++ b/.kktrc.ts @@ -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'; @@ -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: './' }; @@ -77,4 +79,4 @@ export default (conf: WebpackConfiguration, env: 'production' | 'development', o } return conf; -} +}; diff --git a/website/Page.tsx b/website/Page.tsx deleted file mode 100644 index 08664833..00000000 --- a/website/Page.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { useRef, useEffect, useState } from 'react'; -import { Menu, Button } from 'uiw'; -import Markdown from './components/Markdown'; -import Split from '..'; - -export default class Page extends Markdown { - dependencies = { Split, Menu, Button, useRef, useEffect, useState }; - getMdStr = () => import('../README.md'); -}