๐ bootsrap 4.0.0 with PostCSS
See original GitHub issue๐ Configuration (.babelrc, package.json, cli command)
package.json
"dependencies": {
"autoprefixer": "7.2.5",
"bootstrap": "4.0.0",
"node-sass": "4.7.2",
"parcel-bundler": "1.5.0",
"postcss-modules": "1.1.0",
"prismjs": "1.10.0"
}
.postsrc
{
"modules": true,
"plugins": {
"autoprefixer": {
"grid": true
}
}
}
๐ค Expected Behavior
parcel build index.html working like parcel index.html
๐ฏ Current Behavior
ร C:\Users\jaribu\Desktop\dev\tf\node_modules\bootstrap\dist\css\bootstrap.min.css:undefined:undefined: Unknown browser major at error (C:\Users\jaribu\Desktop\dev\tf\node_modules\browserslist\index.js:37:11) at Function.browserslist.checkName (C:\Users\jaribu\Desktop\dev\tf\node_modules\browserslist\index.js:320:18) at Function.select (C:\Users\jaribu\Desktop\dev\tf\node_modules\browserslist\index.js:438:37) at C:\Users\jaribu\Desktop\dev\tf\node_modules\browserslist\index.js:207:41 at Array.forEach (<anonymous>) at browserslist (C:\Users\jaribu\Desktop\dev\tf\node_modules\browserslist\index.js:196:13) at Browsers.parse (C:\Users\jaribu\Desktop\dev\tf\node_modules\cssnano\node_modules\autoprefixer\lib\browsers.js:44:14) at new Browsers (C:\Users\jaribu\Desktop\dev\tf\node_modules\cssnano\node_modules\autoprefixer\lib\browsers.js:39:28) at loadPrefixes (C:\Users\jaribu\Desktop\dev\tf\node_modules\cssnano\node_modules\autoprefixer\lib\autoprefixer.js:56:18) at plugin (C:\Users\jaribu\Desktop\dev\tf\node_modules\cssnano\node_modules\autoprefixer\lib\autoprefixer.js:62:18) Unknown error from PostCSS plugin. Your current PostCSS version is 6.0.16, but autoprefixer uses 5.2.18. Perhaps this is the source of the error below. (node:8272) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): BrowserslistError: Unknown browser major (node:8272) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will termina te the Node.js process with a non-zero exit code.
๐ Possible Solution
๐ฆ Context
๐ป Code Sample
import 'prismjs'
import './node_modules/prismjs/plugins/autolinker/prism-autolinker.js'
import './node_modules/prismjs/plugins/normalize-whitespace/prism-normalize-whitespace.js'
import './node_modules/bootstrap/dist/css/bootstrap.css'
๐ Your Environment
Software | Version(s) |
---|---|
Parcel | 1.5.0 |
Node | 8.7.0 |
npm/Yarn | 5.6.0 |
Operating System | Windows 7 |
Issue Analytics
- State:
- Created 6 years ago
- Reactions:12
- Comments:22 (5 by maintainers)
This does work for me in index.scss, note the
:global
(https://github.com/css-modules/css-modules#usage-with-preprocessors)@samsch Actually, I can confirm that I have this issue without any PostCSS config as well.