Skip to content

Commit b428429

Browse files
azuclaude
andcommitted
fix(build): webpackのnode:assertモジュール解決エラーを修正
- webpack.config.jsにnode:assertのaliasとnode設定を追加 - PR用のCIワークフロー(test.yml)を追加してビルドテストを実行 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 99f6bf3 commit b428429

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jobs:
1313
concurrency:
1414
group: ${{ github.workflow }}-${{ github.ref }}
1515
steps:
16-
- uses: actions/checkout@v3
17-
- uses: actions/setup-node@v3
16+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
17+
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
1818
with:
1919
node-version: '18'
2020
- name: Build
2121
run: yarn install && yarn run build
2222
working-directory: ./website
2323
- name: Deploy
24-
uses: peaceiris/actions-gh-pages@v3
24+
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
2525
with:
2626
github_token: ${{ secrets.GITHUB_TOKEN }}
2727
publish_dir: ./out

.github/workflows/test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- textlint
7+
push:
8+
branches:
9+
- textlint
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
16+
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
17+
with:
18+
node-version: '18'
19+
- name: Install dependencies
20+
run: yarn install
21+
working-directory: ./website
22+
- name: Install server dependencies
23+
run: npm install
24+
working-directory: ./server
25+
- name: Build website
26+
run: yarn run build
27+
working-directory: ./website

website/webpack.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ const plugins = [
9999
];
100100

101101
module.exports = Object.assign({
102+
resolve: {
103+
alias: {
104+
'node:assert': 'assert'
105+
}
106+
},
102107
optimization: {
103108
moduleIds: DEV ? 'named' : 'hashed',
104109
runtimeChunk: 'single',
@@ -246,6 +251,7 @@ module.exports = Object.assign({
246251
},
247252

248253
node: {
254+
assert: 'empty',
249255
child_process: 'empty',
250256
fs: 'empty',
251257
module: 'empty',

0 commit comments

Comments
 (0)