|
@@ -9,7 +9,7 @@ export default function(options: SemiNextOptions = {}) {
|
|
|
return (nextConfig: NextConfig = {}) => {
|
|
return (nextConfig: NextConfig = {}) => {
|
|
|
const actualConfig: NextConfig = {
|
|
const actualConfig: NextConfig = {
|
|
|
...nextConfig,
|
|
...nextConfig,
|
|
|
- webpack(config, { isServer, webpack }) {
|
|
|
|
|
|
|
+ webpack(config, { isServer, webpack, ...rest }) {
|
|
|
config.plugins.push(new SemiWebpackPlugin({
|
|
config.plugins.push(new SemiWebpackPlugin({
|
|
|
omitCss: options.omitCss === undefined ? true : options.omitCss,
|
|
omitCss: options.omitCss === undefined ? true : options.omitCss,
|
|
|
webpackContext: {
|
|
webpackContext: {
|
|
@@ -39,6 +39,9 @@ export default function(options: SemiNextOptions = {}) {
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ if (typeof nextConfig.webpack === 'function') {
|
|
|
|
|
+ return nextConfig.webpack(config, { isServer, webpack, ...rest });
|
|
|
|
|
+ }
|
|
|
return config;
|
|
return config;
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|