In React-Redux template, move Webpack config for images into sharedConfig so that adding images doesn't break the server build
This commit is contained in:
parent
9528dd7432
commit
c79db4e8e2
|
|
@ -17,7 +17,8 @@ module.exports = (env) => {
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{ test: /\.tsx?$/, include: /ClientApp/, use: 'awesome-typescript-loader?silent=true' }
|
{ test: /\.tsx?$/, include: /ClientApp/, use: 'awesome-typescript-loader?silent=true' },
|
||||||
|
{ test: /\.(png|jpg|jpeg|gif|svg)$/, use: 'url-loader?limit=25000' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
plugins: [new CheckerPlugin()]
|
plugins: [new CheckerPlugin()]
|
||||||
|
|
@ -29,8 +30,7 @@ module.exports = (env) => {
|
||||||
entry: { 'main-client': './ClientApp/boot-client.tsx' },
|
entry: { 'main-client': './ClientApp/boot-client.tsx' },
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{ test: /\.css$/, use: ExtractTextPlugin.extract({ use: isDevBuild ? 'css-loader' : 'css-loader?minimize' }) },
|
{ test: /\.css$/, use: ExtractTextPlugin.extract({ use: isDevBuild ? 'css-loader' : 'css-loader?minimize' }) }
|
||||||
{ test: /\.(png|jpg|jpeg|gif|svg)$/, use: 'url-loader?limit=25000' }
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
output: { path: path.join(__dirname, clientBundleOutputDir) },
|
output: { path: path.join(__dirname, clientBundleOutputDir) },
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue