mirror of
https://github.com/zoriya/flood.git
synced 2026-06-05 11:49:24 +00:00
client: webpack: process file assets with allowed file extension list
This commit is contained in:
@@ -108,18 +108,7 @@ module.exports = {
|
||||
],
|
||||
},
|
||||
{
|
||||
exclude: [
|
||||
/\.html$/,
|
||||
/\.(js|jsx|ts|tsx)$/,
|
||||
/\.css$/,
|
||||
/\.scss$/,
|
||||
/\.json$/,
|
||||
/\.bmp$/,
|
||||
/\.gif$/,
|
||||
/\.jpe?g$/,
|
||||
/\.png$/,
|
||||
/\.svg$/,
|
||||
],
|
||||
test: [/\.md$/, /\.eot$/, /\.ttf$/, /\.woff$/, /\.woff2$/],
|
||||
loader: require.resolve('file-loader'),
|
||||
options: {
|
||||
name: 'static/media/[name].[hash:8].[ext]',
|
||||
@@ -148,7 +137,7 @@ module.exports = {
|
||||
},
|
||||
entry: paths.appIndex,
|
||||
resolve: {
|
||||
extensions: ['*', '.js', '.jsx', '.ts', '.tsx', '.json'],
|
||||
extensions: ['.cjs', '.mjs', '.js', '.jsx', '.ts', '.tsx', '.json'],
|
||||
alias: {
|
||||
'@shared': path.resolve('./shared'),
|
||||
},
|
||||
|
||||
@@ -104,18 +104,7 @@ module.exports = {
|
||||
],
|
||||
},
|
||||
{
|
||||
exclude: [
|
||||
/\.html$/,
|
||||
/\.(js|jsx|ts|tsx)$/,
|
||||
/\.css$/,
|
||||
/\.scss$/,
|
||||
/\.json$/,
|
||||
/\.bmp$/,
|
||||
/\.gif$/,
|
||||
/\.jpe?g$/,
|
||||
/\.png$/,
|
||||
/\.svg$/,
|
||||
],
|
||||
test: [/\.md$/, /\.eot$/, /\.ttf$/, /\.woff$/, /\.woff2$/],
|
||||
loader: require.resolve('file-loader'),
|
||||
options: {
|
||||
name: 'static/media/[name].[hash:8].[ext]',
|
||||
@@ -144,7 +133,7 @@ module.exports = {
|
||||
},
|
||||
entry: paths.appIndex,
|
||||
resolve: {
|
||||
extensions: ['*', '.js', '.jsx', '.ts', '.tsx', '.json'],
|
||||
extensions: ['.cjs', '.mjs', '.js', '.jsx', '.ts', '.tsx', '.json'],
|
||||
alias: {
|
||||
'react-intl': 'react-intl/react-intl-no-parser.umd.min.js',
|
||||
'@shared': path.resolve('./shared'),
|
||||
|
||||
Reference in New Issue
Block a user