diff --git a/cli/builder.js b/cli/builder.js index 1500c6c9..174d21d7 100755 --- a/cli/builder.js +++ b/cli/builder.js @@ -128,11 +128,9 @@ function readPageNamespaces() { // Clear index folder case .replace(/\/index$/, '') || '/' - if (pageId.match(/\.s?css$/)) return - const namespaces = await getPageNamespaces({ pages }, pageId) - if (!isNextInternal(page) && logBuild) { + if (!isNextInternal(page) && logBuild && !pageId.match(/\.s?css$/)) { console.log(`🔨 ${pageId}`, namespaces) } @@ -249,8 +247,8 @@ function buildPageInAllLocales(pagePath, namespaces) { prefix = prefix.replace('/..', '') } - // _app.js , _document.js, _error.js, /api/* - if (isNextInternal(pagePath)) { + // _app.js , _document.js, _error.js, /api/*, .css, .scss + if (isNextInternal(pagePath) || pagePath.match(/\.s?css$/)) { if (pagePath.includes('/api/')) { fs.mkdirSync(`${finalPagesDir}/api`, { recursive: true }) copyFolderRecursiveSync( diff --git a/package.json b/package.json index ea825971..179b7360 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "next-translate", - "version": "0.17.2-canary.1", + "version": "0.17.2-canary.2", "description": "Next.js utility to translate pages without the need of a server (static i18n pages generator).", "license": "MIT", "keywords": [