rollup 打包build报错:[!] Error: Unexpected character ‘@‘ (Note that you need plugins to import files th

[!] Error: Unexpected character '@' (Note that you need plugins to import files that are not JavaScript)
styles\index.scss (1:0)
1: @import './variable.scss';

解决方案:

  PostCSS({
        minimize: true,
        modules: {
            generateScopedName: '[local]___[hash:base64:5]',
        },
        modules: true,
        extensions: ['.css'],
        use: {
            sass: null,
            stylus: null,
        },
        extract: true
    }),


版权声明:本文为q7410p123原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。