Skip to content

Commit

Permalink
hotfix: update webpack Sass loader config to always output nested CSS…
Browse files Browse the repository at this point in the history
… to address a recent Sass Loader upstream change + update CLI to force i18n to be enabled by default for prod builds if otherwise undefined
  • Loading branch information
sghoweri committed Aug 27, 2019
1 parent c303ef5 commit 1127c57
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/build-tools/cli.js
Expand Up @@ -118,12 +118,13 @@ if (program.configFile) {
// automatically set enableSSR to true in prod mode and false in dev mode, unless manually set.
config.enableSSR = false;

// automatically enable i18n in production builds if undefined
config.i18n =
typeof options.i18n === 'undefined'
? config.prod
? true
: false
: options.i18n;
typeof options.i18n !== 'undefined'
? options.i18n
: config.prod
? true
: false;

// If i18n is disabled, ignore and remove lang config settings
if (config.lang && config.i18n === false) {
Expand Down
1 change: 1 addition & 0 deletions packages/build-tools/create-webpack-config.js
Expand Up @@ -232,6 +232,7 @@ async function createWebpackConfig(buildConfig) {
functions: sassExportData,
precision: 3,
data: globalSassData.join('\n'),
outputStyle: 'nested',
},
},
];
Expand Down

0 comments on commit 1127c57

Please sign in to comment.