mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 15:17:23 +02:00
feat(v2): easier plugin theme components swizzling (#1436)
* feat(v2): easier plugin theme components override * add context * refactor again * rename eject -> swizzle * nits
This commit is contained in:
parent
3298d8cd23
commit
0834784455
11 changed files with 91 additions and 90 deletions
|
@ -151,19 +151,12 @@ class DocusaurusPluginContentDocs {
|
|||
});
|
||||
}
|
||||
|
||||
getThemePath() {
|
||||
return path.resolve(__dirname, './theme');
|
||||
}
|
||||
|
||||
configureWebpack(config, isServer, {getBabelLoader, getCacheLoader}) {
|
||||
return {
|
||||
resolve: {
|
||||
alias: {
|
||||
'@theme/DocItem': path.resolve(__dirname, './theme/DocItem'),
|
||||
'@theme/DocPage': path.resolve(__dirname, './theme/DocPage'),
|
||||
'@theme/DocPaginator': path.resolve(
|
||||
__dirname,
|
||||
'./theme/DocPaginator',
|
||||
),
|
||||
'@theme/DocSidebar': path.resolve(__dirname, './theme/DocSidebar'),
|
||||
},
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue