mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-10 23:02:56 +02:00
feat(v2): docs plugin continued (#1337)
* refactor(v2): shift markdown loader into plugin * fix(v2): build command configure webpack * temporary fix for failing test
This commit is contained in:
parent
50bbc1dcd7
commit
1a8e12048e
14 changed files with 181 additions and 132 deletions
|
@ -60,12 +60,21 @@ module.exports = async function build(siteDir, cliOptions = {}) {
|
|||
let serverConfig = createServerConfig(props).toConfig();
|
||||
|
||||
// Plugin lifecycle - configureWebpack
|
||||
plugins.forEach(({configureWebpack}) => {
|
||||
plugins.forEach(plugin => {
|
||||
const {configureWebpack} = plugin;
|
||||
if (!configureWebpack) {
|
||||
return;
|
||||
}
|
||||
clientConfig = applyConfigureWebpack(configureWebpack, clientConfig, false);
|
||||
serverConfig = applyConfigureWebpack(configureWebpack, serverConfig, true);
|
||||
clientConfig = applyConfigureWebpack(
|
||||
configureWebpack.bind(plugin), // The plugin lifecycle may reference `this`.
|
||||
clientConfig,
|
||||
false,
|
||||
);
|
||||
serverConfig = applyConfigureWebpack(
|
||||
configureWebpack.bind(plugin), // The plugin lifecycle may reference `this`.
|
||||
serverConfig,
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
// Build the client bundles first.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue