Skip to content

Commit 9ee35c9

Browse files
committed
refactor: use 'public' as default value for 'options.static'
1 parent cf7d0cf commit 9ee35c9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/utils/normalizeOptions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function normalizeOptions(compiler, options) {
1515
: {};
1616

1717
const defaultOptionsForStatic = {
18-
directory: path.join(process.cwd(), 'static'),
18+
directory: path.join(process.cwd(), 'public'),
1919
staticOptions: {},
2020
publicPath: ['/'],
2121
serveIndex: { icons: true },

test/server/utils/normalizeOptions.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ describe('normalizeOptions', () => {
449449

450450
if (data.options.static) {
451451
data.options.static.forEach((staticOpts) => {
452-
if (staticOpts.directory === path.join(process.cwd(), 'static')) {
452+
if (staticOpts.directory === path.join(process.cwd(), 'public')) {
453453
// give an indication in the snapshot that this is the
454454
// current working directory
455455
staticOpts.directory = 'CWD';

0 commit comments

Comments
 (0)