rsuite
rsuite copied to clipboard
Next.js - Class name prefix module parse failed: Unexpected token
Versions
package | version |
---|---|
next |
^9.5.1 |
react |
^16.13.1 |
rsuite |
^4.8.0 |
What is the expected behavior?
Modify the component's className prefix
What is the current behavior?
className prefix is not being modified
What are the steps to reproduce?
next.config.js:
const withImages = require('next-images');
const withLess = require('@zeit/next-less');
const webpack = require('webpack');
module.exports = withImages(
withLess({
lessLoaderOptions: {
javascriptEnabled: true,
},
plugins: [
//...
new webpack.DefinePlugin({
__RSUITE_CLASSNAME_PREFIX__: 'test-'
})
]
}),
);
custom-theme.less:
@import '~rsuite/lib/styles/themes/default/index.less';
@ns: test-;
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.