Skip to content

Commit

Permalink
chore: fix site builder
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Jan 16, 2024
1 parent 7e07af0 commit 8315761
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
25 changes: 24 additions & 1 deletion docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ module.exports = {
title: "eslint-plugin-node-dependencies",
description: "ESLint plugin to check Node.js dependencies.",
serviceWorker: true,
evergreen: true,
configureWebpack(_config, _isServer) {
return {
resolve: {
Expand All @@ -50,10 +49,34 @@ module.exports = {
"../../node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs",
),
synckit: path.resolve(__dirname, "./shim/synckit"),
"eslint-compat-utils$": path.resolve(
__dirname,
"../../node_modules/eslint-compat-utils/dist/index.cjs",
),
},
},
};
},
chainWebpack(config) {
// In order to parse with webpack 4, the yaml package needs to be transpiled by babel.
const jsRule = config.module.rule("js");
const original = jsRule.exclude.values();
jsRule.exclude
.clear()
.add((filepath) => {
if (/node_modules\/(?:minimatch|yaml)\//u.test(filepath)) {
return false;
}
for (const fn of original) {
if (fn(filepath)) {
return true;
}
}
return false;
})
.end()
.use("babel-loader");
},

head: [
// ["link", { rel: "icon", type: "image/png", href: "/logo.png" }]
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.24.2",
"@eslint-community/eslint-utils": "^4.4.0",
"@ota-meshi/eslint-plugin": "^0.15.0",
"@types/chai": "^4.2.18",
"@types/eslint": "^8.0.0",
Expand Down

0 comments on commit 8315761

Please sign in to comment.