File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { Config } from '@docusaurus/types' ;
22import type { Options as PresetOptions , ThemeConfig } from '@docusaurus/preset-classic' ;
3+ import path from 'node:path' ;
4+ import { fileURLToPath } from 'node:url' ;
35import { themes as prismThemes } from 'prism-react-renderer' ;
46
7+ const docsSiteDir = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
8+
59const config : Config = {
610 title : '@crup/react-timer-hook' ,
711 tagline : 'Deterministic React timer primitives for real apps.' ,
@@ -33,6 +37,26 @@ const config: Config = {
3337 } satisfies PresetOptions ,
3438 ] ,
3539 ] ,
40+ plugins : [
41+ function generatedFilesWebpackParser ( ) {
42+ return {
43+ name : 'generated-files-webpack-parser' ,
44+ configureWebpack ( ) {
45+ return {
46+ module : {
47+ rules : [
48+ {
49+ include : path . join ( docsSiteDir , '.docusaurus' ) ,
50+ test : / \. j s $ / ,
51+ type : 'javascript/auto' ,
52+ } ,
53+ ] ,
54+ } ,
55+ } ;
56+ } ,
57+ } ;
58+ } ,
59+ ] ,
3660 themeConfig : {
3761 image : 'img/social-card.svg' ,
3862 navbar : {
You can’t perform that action at this time.
0 commit comments