Skip to content

Commit

Permalink
Merge pull request #410 from dyte-io/feat-docusaurus-faster
Browse files Browse the repository at this point in the history
perf: enable docusaurus faster
  • Loading branch information
vaibhavshn authored Dec 19, 2024
2 parents bcbca26 + b67879e commit e425ab3
Show file tree
Hide file tree
Showing 6 changed files with 6,507 additions and 2,880 deletions.
5 changes: 0 additions & 5 deletions babel.config.js

This file was deleted.

37 changes: 20 additions & 17 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,9 @@ const resourcesHTML = fs.readFileSync('./src/snippets/resources.html', 'utf-8');
const config = {
...meta,
plugins,
future: {
experimental_faster: true,
},

trailingSlash: false,
themes: ['@docusaurus/theme-live-codeblock', '@docusaurus/theme-mermaid'],
Expand Down Expand Up @@ -661,23 +664,23 @@ const config = {
},
}),

webpack: {
jsLoader: (isServer) => ({
loader: require.resolve('swc-loader'),
options: {
jsc: {
parser: {
syntax: 'typescript',
tsx: true,
},
target: 'es2017',
},
module: {
type: isServer ? 'commonjs' : 'es6',
},
},
}),
},
// webpack: {
// jsLoader: (isServer) => ({
// loader: require.resolve('swc-loader'),
// options: {
// jsc: {
// parser: {
// syntax: 'typescript',
// tsx: true,
// },
// target: 'es2017',
// },
// module: {
// type: isServer ? 'commonjs' : 'es6',
// },
// },
// }),
// },
};

module.exports = config;
Loading

0 comments on commit e425ab3

Please sign in to comment.