Skip to content

Commit

Permalink
Allow sass to live update when there are square brackets in the path
Browse files Browse the repository at this point in the history
  • Loading branch information
BenSurgisonGDS committed Dec 19, 2022
1 parent 523bed7 commit e00d82d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/build/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ function generateCss (sassPath, cssPath, options = {}) {
function watchSass (sassPath, generateSassPath, cssPath, options) {
if (!fse.existsSync(sassPath)) return
chokidar.watch(sassPath, {
ignoreInitial: true
ignoreInitial: true,
disableGlobbing: true // Prevents square brackets from being mistaken for globbing characters
}).on('all', () => {
generateCss(generateSassPath, cssPath, options)
})
Expand Down
1 change: 1 addition & 0 deletions lib/extensions/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ let previousPlugins = getCurrentPlugins()
function watchPlugins (afterWatch) {
chokidar.watch(pkgPath, {
ignoreInitial: true,
disableGlobbing: true, // Prevents square brackets from being mistaken for globbing characters
awaitWriteFinish: true
}).on('change', () => {
const currentPlugins = getCurrentPlugins()
Expand Down

0 comments on commit e00d82d

Please sign in to comment.