babel-register 無法正確讀取 CSS 相關檔案

A babel/register style hook to ignore style imports when running in Node. This is for projects that use something like Webpack to enable CSS imports in JavaScript.

報錯

babel-register 無法正確讀取 CSS 相關檔案

解法

使用 ignore-styles 忽略讀取 CSS 相關檔案(Ignore imported style files when running in Node)。


webpack babel