You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
As node is trying to process less-css-scss file.So we do not want node on the server to process those files at all.
Why can't i use babel-plugin-transform-require-ignore
babel-plugin-transform-require-ignore will remove require statements for styles from transpiled outputso yourlib/index.js will have no mentioning of
require('myStyles.less')
But now, if you run your webpack to create client bundle from yourlib/*, your webpack style loader and ExtractTextPluginwill not find any less-css-scss files to grab and bundle.With the appoach of wrapping require to client only condition - require is still there for webpack to act on.