Skip to content

Commit 3201d61

Browse files
committed
Switch from [contenthash] back to [fullhash] (prev [hash]) in Dev config
contenthash is not recommended in dev mode, and hash, the value we previously used, has been renamed fullhash for clarity.
1 parent b42bf86 commit 3201d61

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/presets.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ const development = ( config = {} ) => {
122122
// Add /* filename */ comments to generated require()s in the output.
123123
pathinfo: true,
124124
// Provide a default output name.
125-
filename: '[name].[contenthash].js',
125+
filename: '[name].[fullhash].js',
126126
// Provide chunk filename. Requires content hash for cache busting.
127-
chunkFilename: '[name].[contenthash].chunk.js',
127+
chunkFilename: '[name].[fullhash].chunk.js',
128128
// `publicPath` will be inferred as a localhost URL based on output.path
129129
// when a devServer.port value is available.
130130
},

src/presets.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ describe( 'presets', () => {
9595
expect( config.entry ).toEqual( 'some-file.js' );
9696
expect( config.output ).toEqual( {
9797
pathinfo: true,
98-
filename: '[name].[contenthash].js',
99-
chunkFilename: '[name].[contenthash].chunk.js',
98+
filename: '[name].[fullhash].js',
99+
chunkFilename: '[name].[fullhash].chunk.js',
100100
path: 'build/',
101101
} );
102102
} );

0 commit comments

Comments
 (0)