@@ -12,7 +12,7 @@ import { getOutputHashFormat } from './hash-format';
12
12
import { PostcssCliResources } from './webpack/plugins/postcss-cli-resources' ;
13
13
import { normalizeExtraEntryPoints } from './webpack/normalize-entry' ;
14
14
15
- import { NxWebpackPlugin } from './config' ;
15
+ import { NxWebpackExecutionContext , NxWebpackPlugin } from './config' ;
16
16
import {
17
17
ExtraEntryPointClass ,
18
18
NormalizedWebpackExecutorOptions ,
@@ -25,7 +25,6 @@ import CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
25
25
import MiniCssExtractPlugin = require( 'mini-css-extract-plugin' ) ;
26
26
import autoprefixer = require( 'autoprefixer' ) ;
27
27
import postcssImports = require( 'postcss-import' ) ;
28
- import { NxWebpackExecutionContext } from './config' ;
29
28
30
29
interface PostcssOptions {
31
30
( loader : any ) : any ;
@@ -47,6 +46,7 @@ export interface WithWebOptions {
47
46
stylePreprocessorOptions ?: any ;
48
47
styles ?: Array < ExtraEntryPointClass | string > ;
49
48
subresourceIntegrity ?: boolean ;
49
+ ssr ?: boolean ;
50
50
}
51
51
52
52
// Omit deprecated options
@@ -110,11 +110,13 @@ export function withWeb(pluginOptions: WithWebOptions = {}): NxWebpackPlugin {
110
110
} )
111
111
) ;
112
112
}
113
- plugins . push (
114
- new webpack . DefinePlugin (
115
- getClientEnvironment ( process . env . NODE_ENV ) . stringified
116
- )
117
- ) ;
113
+ if ( ! pluginOptions . ssr ) {
114
+ plugins . push (
115
+ new webpack . DefinePlugin (
116
+ getClientEnvironment ( process . env . NODE_ENV ) . stringified
117
+ )
118
+ ) ;
119
+ }
118
120
119
121
const entry : { [ key : string ] : string [ ] } = { } ;
120
122
const globalStylePaths : string [ ] = [ ] ;
@@ -557,7 +559,6 @@ function getCommonLoadersForGlobalStyle(
557
559
558
560
function postcssOptionsCreator (
559
561
options : MergedOptions ,
560
-
561
562
{
562
563
includePaths,
563
564
forCssModules = false ,
1 commit comments
vercel[bot] commentedon Apr 27, 2023
Successfully deployed to the following URLs:
nx-dev – ./
nx-dev-git-master-nrwl.vercel.app
nx.dev
nx-dev-nrwl.vercel.app
nx-five.vercel.app