From ecf517374b7accf08352871f1b40715caf701238 Mon Sep 17 00:00:00 2001 From: "MIYASHITA, Akihiro" Date: Wed, 28 Jun 2023 19:26:04 +0900 Subject: [PATCH] Modify webpack.config.js: to fix output file name --- track-tutorial-react-js/config/webpack.config.js | 8 ++++---- track-tutorial-react-ts/config/webpack.config.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/track-tutorial-react-js/config/webpack.config.js b/track-tutorial-react-js/config/webpack.config.js index 207d075..82fccdd 100644 --- a/track-tutorial-react-js/config/webpack.config.js +++ b/track-tutorial-react-js/config/webpack.config.js @@ -209,11 +209,11 @@ module.exports = function (webpackEnv) { // There will be one main bundle, and one file per asynchronous chunk. // In development, it does not produce real files. filename: isEnvProduction - ? 'static/js/[name].[contenthash:8].js' + ? 'static/js/[name].js' : isEnvDevelopment && 'static/js/bundle.js', // There are also additional JS chunk files if you use code splitting. chunkFilename: isEnvProduction - ? 'static/js/[name].[contenthash:8].chunk.js' + ? 'static/js/[name].chunk.js' : isEnvDevelopment && 'static/js/[name].chunk.js', assetModuleFilename: 'static/media/[name].[hash][ext]', // webpack uses `publicPath` to determine where the app is being served from. @@ -625,8 +625,8 @@ module.exports = function (webpackEnv) { new MiniCssExtractPlugin({ // Options similar to the same options in webpackOptions.output // both options are optional - filename: 'static/css/[name].[contenthash:8].css', - chunkFilename: 'static/css/[name].[contenthash:8].chunk.css', + filename: 'static/css/[name].css', + chunkFilename: 'static/css/[name].chunk.css', }), // Generate an asset manifest file with the following content: // - "files" key: Mapping of all asset filenames to their corresponding diff --git a/track-tutorial-react-ts/config/webpack.config.js b/track-tutorial-react-ts/config/webpack.config.js index 207d075..82fccdd 100644 --- a/track-tutorial-react-ts/config/webpack.config.js +++ b/track-tutorial-react-ts/config/webpack.config.js @@ -209,11 +209,11 @@ module.exports = function (webpackEnv) { // There will be one main bundle, and one file per asynchronous chunk. // In development, it does not produce real files. filename: isEnvProduction - ? 'static/js/[name].[contenthash:8].js' + ? 'static/js/[name].js' : isEnvDevelopment && 'static/js/bundle.js', // There are also additional JS chunk files if you use code splitting. chunkFilename: isEnvProduction - ? 'static/js/[name].[contenthash:8].chunk.js' + ? 'static/js/[name].chunk.js' : isEnvDevelopment && 'static/js/[name].chunk.js', assetModuleFilename: 'static/media/[name].[hash][ext]', // webpack uses `publicPath` to determine where the app is being served from. @@ -625,8 +625,8 @@ module.exports = function (webpackEnv) { new MiniCssExtractPlugin({ // Options similar to the same options in webpackOptions.output // both options are optional - filename: 'static/css/[name].[contenthash:8].css', - chunkFilename: 'static/css/[name].[contenthash:8].chunk.css', + filename: 'static/css/[name].css', + chunkFilename: 'static/css/[name].chunk.css', }), // Generate an asset manifest file with the following content: // - "files" key: Mapping of all asset filenames to their corresponding