2021-08-29 21:56:27 -07:00
|
|
|
module.exports = {
|
2021-04-13 12:48:36 -07:00
|
|
|
target: 'serverless',
|
2021-08-29 21:56:27 -07:00
|
|
|
webpack: (config, { isServer }) => {
|
|
|
|
// Important: return the modified config
|
2021-07-18 10:24:15 -07:00
|
|
|
if (!isServer) {
|
2021-08-29 21:56:27 -07:00
|
|
|
config.resolve.fallback.fs = false
|
2021-07-18 10:24:15 -07:00
|
|
|
}
|
2021-03-30 15:47:08 -07:00
|
|
|
config.module.rules.push({
|
2021-08-29 21:56:27 -07:00
|
|
|
test: /\.svg?$/,
|
|
|
|
oneOf: [
|
|
|
|
{
|
|
|
|
use: [
|
|
|
|
{
|
|
|
|
loader: '@svgr/webpack',
|
|
|
|
options: {
|
|
|
|
prettier: false,
|
|
|
|
svgo: true,
|
|
|
|
svgoConfig: {
|
|
|
|
plugins: [{ removeViewBox: false }],
|
|
|
|
},
|
|
|
|
titleProp: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
issuer: {
|
|
|
|
and: [/\.(ts|tsx|js|jsx|md|mdx)$/],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2021-03-30 15:47:08 -07:00
|
|
|
})
|
|
|
|
return config
|
|
|
|
},
|
2021-08-29 21:56:27 -07:00
|
|
|
}
|