Skip to content

Commit 8878c75

Browse files
committed
material render with universal
1 parent b130b49 commit 8878c75

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

webpack.config.ts

+17-2
Original file line numberDiff line numberDiff line change
@@ -316,15 +316,30 @@ const clientConfig = function webpackConfig(): WebpackConfig {
316316

317317
return config;
318318

319-
} ();
319+
}();
320320

321321
const serverConfig: WebpackConfig = {
322322
target: 'node',
323323
entry: AOT ? './src/server.aot' : './src/server',
324324
output: {
325325
filename: 'server.js',
326326
path: root('dist')
327-
}
327+
},
328+
module: {
329+
rules: [
330+
{
331+
test: /@angular(\\|\/)material/,
332+
loader: 'imports-loader',
333+
options: {
334+
window: '>global',
335+
'CSS': '>null',
336+
navigator: '>{get userAgent(){ return \'Chrome\'; }}',
337+
document: '>global.document',
338+
},
339+
},
340+
]
341+
},
342+
328343
};
329344

330345
const defaultConfig = {

0 commit comments

Comments
 (0)