Skip to content

Commit

Permalink
docs: fix images loading (#10621)
Browse files Browse the repository at this point in the history
* docs: fix images loading

* docs: temporary restore configureWebpack

* docs: rm html-webpack-plugin
  • Loading branch information
dangreen authored Aug 23, 2022
1 parent 1d6b8cc commit f957aad
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 67 deletions.
17 changes: 5 additions & 12 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import * as path from 'path';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import HtmlWebpackInlineSourcePlugin from 'html-webpack-inline-source-plugin';
import markdownItInclude from 'markdown-it-include';
import { DefaultThemeConfig, defineConfig, PluginTuple } from 'vuepress/config';

Expand All @@ -16,16 +14,6 @@ export default defineConfig({
head: [
['link', {rel: 'icon', href: '/favicon.ico'}],
],
configureWebpack: (config, isServer) => {
configureWebpack: (config) => {
return {
plugins: [
new HtmlWebpackPlugin(),
new HtmlWebpackInlineSourcePlugin(HtmlWebpackPlugin),
],
};
};
},
plugins: [
'tabs',
['flexsearch'],
Expand Down Expand Up @@ -107,6 +95,11 @@ export default defineConfig({
}
}
})

config.module.rule('images').use('url-loader').tap(options => ({
...options,
esModule: false
}))
},
markdown: {
extendMarkdown: md => {
Expand Down
2 changes: 0 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
"@simonbrunel/vuepress-plugin-versions": "^0.2.0",
"@vuepress/plugin-google-analytics": "^1.9.7",
"@vuepress/plugin-html-redirect": "^0.1.2",
"html-webpack-inline-source-plugin": "^0.0.10",
"html-webpack-plugin": "^4.5.2",
"markdown-it": "^8.4.2",
"markdown-it-include": "^2.0.0",
"typedoc": "^0.23.10",
Expand Down
59 changes: 6 additions & 53 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f957aad

Please sign in to comment.