mirror of
https://github.com/jambonz/next-static-site.git
synced 2025-12-19 04:47:44 +00:00
16 lines
369 B
JavaScript
16 lines
369 B
JavaScript
module.exports = {
|
|
trailingSlash: true,
|
|
webpack: (config, { dev, isServer }) => {
|
|
// Replace React with Preact only for client
|
|
if (!isServer) {
|
|
Object.assign(config.resolve.alias, {
|
|
react: 'preact/compat',
|
|
'react-dom/test-utils': 'preact/test-utils',
|
|
'react-dom': 'preact/compat',
|
|
});
|
|
}
|
|
|
|
return config;
|
|
},
|
|
};
|