mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-31 01:47:17 +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
|
@ -156,24 +156,12 @@ class DocusaurusPluginContentBlog {
|
|||
);
|
||||
}
|
||||
|
||||
getThemePath() {
|
||||
return path.resolve(__dirname, './theme');
|
||||
}
|
||||
|
||||
configureWebpack(config, isServer, {getBabelLoader, getCacheLoader}) {
|
||||
return {
|
||||
resolve: {
|
||||
alias: {
|
||||
'@theme/BlogListPage': path.resolve(
|
||||
__dirname,
|
||||
'./theme/BlogListPage',
|
||||
),
|
||||
'@theme/BlogPostItem': path.resolve(
|
||||
__dirname,
|
||||
'./theme/BlogPostItem',
|
||||
),
|
||||
'@theme/BlogPostPage': path.resolve(
|
||||
__dirname,
|
||||
'./theme/BlogPostPage',
|
||||
),
|
||||
},
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue