Skip to content

Commit edb0862

Browse files
authored
build: bundle namor dict files (#1949)
1 parent 6a2b8c9 commit edb0862

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tools/webpack/webpack.main.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ export const mainConfig = (
4949
from: 'node_modules/sfw/package.json',
5050
to: '../sfw/package.json',
5151
},
52+
// namor v3 reads its word lists from disk at runtime via
53+
// `fs.readFileSync(path.resolve(__dirname, '../dict', ...))`. When
54+
// bundled, __dirname is `.webpack/main`, so the dict files need to
55+
// live at `.webpack/dict` for namor to find them.
56+
{
57+
from: 'node_modules/namor/dict',
58+
to: '../dict',
59+
},
5260
],
5361
}),
5462
],

0 commit comments

Comments
 (0)