-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module build failed: Syntax Error, Unnecessary curly bracket #1062
Comments
Can you add error stacktrace? |
postcss.config.js module.exports = {
- parser: 'sugarss', // <= SyntaxError
plugins: {
- 'postcss-import': {}, // css-loader handles @import no need for this plugin in webpack
'postcss-cssnext': {},
'autoprefixer': {},
'cssnano': {}
}
} SugarSS is whitespace sensitive convenience syntax for CSS, if you intend to use it use the index.sss html,
body
border: 0;
font-family: 'Conv_ProximaNova-Regular', Sans-Serif !important;
line-height: 1.5;
margin: 0;
padding: 0;
width: 100%; index.css html,
body {
border: 0;
font-family: 'Conv_ProximaNova-Regular', Sans-Serif !important;
line-height: 1.5;
margin: 0;
padding: 0;
width: 100%;
} postcss.config.js + module.exports = ({ file, options, env }) => ({
+ parser: file.extname === '.sss' ? 'sugarss' : false, // Handles `.css` && '.sss' files dynamically
plugins: {
'postcss-cssnext': {},
'autoprefixer': {},
+ 'cssnano': env === 'production' ? {} : false
}
}) |
Yep 😛 as the issue title suggest you are using a custom parser for plain |
Css
postcss.config.js
webpack.config.js
Issue.zip
The text was updated successfully, but these errors were encountered: