-
Notifications
You must be signed in to change notification settings - Fork 48
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
css-modules use case #14
Comments
Hmm, yes, in your assets you have this require:
When Theoretically I could extend the var original = Module._findPath
Module._findPath = function(request, paths) {
var filename = original.apply(this, arguments)
if (filename === false) {
// then try to resolve this path in `webpack-assets.json`
}
} Is module with name |
In production the other error is because:
And it seems to be a bug in |
This works great... if (module.source) {
const regex = options.development ? /exports\.locals = ((.|\n)+);/ : /module\.exports = ((.|\n)+);/;
const match = module.source.match(regex);
return match ? JSON.parse(match[1]) : {};
} |
Ok, I see, that should work, yes. I'll leave this for tomorrow.
? Or equal to a substring, maybe.
|
If I comment out ./assets/index.scss// @import 'normalize.css/normalize.css';
// @import 'basscss-base-reset/index.css';
:global {
body {
background-color: #FFFFFF;
}
} ./src/common/pages/App/App.scss.content {
margin: 50px 0; // for fixed navbar
}
|
Yes, I've just fixed this small bug, rolling out a release |
Released v2.0.2 |
ok,
dev{
"javascript": {
"app": "http://localhost:8082/dist/app-1cb34d22d279fdb30639.js"
},
"styles": {},
"assets": {
"./assets/index.scss": "exports = module.exports = require(\"./../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"body {\\n background-color: #FFFFFF;\\n}\\n\", \"\", {\"version\":3,\"sources\":[\"/./assets/assets/index.scss\"],\"names\":[],\"mappings\":\"AAMA;EAEI,0BAA0B;CAC3B\",\"file\":\"index.scss\",\"sourcesContent\":[\"// @import 'normalize.css/normalize.css';\\n// @import 'basscss-base-reset/index.css';\\n// @import 'basscss/css/basscss.css';\\n\\n// @import './styles/Select.scss';\\n\\n:global {\\n body {\\n background-color: #FFFFFF;\\n }\\n}\\n\"],\"sourceRoot\":\"webpack://\"}]);\n\n// exports\n\n module.exports = exports.locals || {}; module.exports._style = exports.toString();",
"./src/common/pages/App/App.scss": "exports = module.exports = require(\"./../../../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".content___HT6CO {\\n margin: 150px 0;\\n}\\n\", \"\", {\"version\":3,\"sources\":[\"/./src/common/pages/App/src/common/pages/src/common/pages/App/App.scss\"],\"names\":[],\"mappings\":\"AAAA;EACE,gBAAgB;CACjB\",\"file\":\"App.scss\",\"sourcesContent\":[\".content {\\n margin: 150px 0; // for fixed navbar\\n}\\n\"],\"sourceRoot\":\"webpack://\"}]);\n\n// exports\nexports.locals = {\n\t\"content\": \"content___HT6CO\"\n};\n module.exports = exports.locals || {}; module.exports._style = exports.toString();"
}
} production{"javascript":{"app":"/dist/app-341ab6df016d88d9fdbe.js"},"styles":{"app":"/dist/app-341ab6df016d88d9fdbe.css"},"assets":{"./assets/index.scss":"// removed by extract-text-webpack-plugin","./src/common/pages/App/App.scss":"// removed by extract-text-webpack-plugin\nmodule.exports = {\"content\":\"HT6COZRgtOuqJHvvUI2XY\"};"}} |
ok. So, what about that
Or equal to a substring, maybe.
Alternatively you can upload |
Here is the file. https://gist.github.com/a900abf2bfe975cd70c2 Maybe this one is what you are looking for? {
"id": 717,
"identifier": "C:\\Users\\david\\www\\projects\\STI\\v3.1\\node_modules\\css-loader\\index.js?modules&importLoaders=2&sourceMap&localIdentName=[local]___[hash:base64:5]!C:\\Users\\david\\www\\projects\\STI\\v3.1\\node_modules\\autoprefixer-loader\\index.js?browsers=last 2 version!C:\\Users\\david\\www\\projects\\STI\\v3.1\\node_modules\\sass-loader\\index.js?outputStyle=expanded&sourceMap=true&sourceMapContents=true!C:\\Users\\david\\www\\projects\\STI\\v3.1\\node_modules\\normalize.css\\normalize.css",
"name": "./~/css-loader?modules&importLoaders=2&sourceMap&localIdentName=[local]___[hash:base64:5]!./~/autoprefixer-loader?browsers=last 2 version!./~/sass-loader?outputStyle=expanded&sourceMap=true&sourceMapContents=true!./~/normalize.css/normalize.css",
"index": 1064,
"index2": 1058,
"size": 26689,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "C:\\Users\\david\\www\\projects\\STI\\v3.1\\node_modules\\css-loader\\index.js?modules&importLoaders=2&sourceMap&localIdentName=[local]___[hash:base64:5]!C:\\Users\\david\\www\\projects\\STI\\v3.1\\node_modules\\autoprefixer-loader\\index.js?browsers=last 2 version!C:\\Users\\david\\www\\projects\\STI\\v3.1\\node_modules\\sass-loader\\index.js?outputStyle=expanded&sourceMap=true&sourceMapContents=true!C:\\Users\\david\\www\\projects\\STI\\v3.1\\assets\\index.scss",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 176,
"moduleIdentifier": "C:\\Users\\david\\www\\projects\\STI\\v3.1\\node_modules\\css-loader\\index.js?modules&importLoaders=2&sourceMap&localIdentName=[local]___[hash:base64:5]!C:\\Users\\david\\www\\projects\\STI\\v3.1\\node_modules\\autoprefixer-loader\\index.js?browsers=last 2 version!C:\\Users\\david\\www\\projects\\STI\\v3.1\\node_modules\\sass-loader\\index.js?outputStyle=expanded&sourceMap=true&sourceMapContents=true!C:\\Users\\david\\www\\projects\\STI\\v3.1\\assets\\index.scss",
"module": "./~/css-loader?modules&importLoaders=2&sourceMap&localIdentName=[local]___[hash:base64:5]!./~/autoprefixer-loader?browsers=last 2 version!./~/sass-loader?outputStyle=expanded&sourceMap=true&sourceMapContents=true!./assets/index.scss",
"moduleName": "./~/css-loader?modules&importLoaders=2&sourceMap&localIdentName=[local]___[hash:base64:5]!./~/autoprefixer-loader?browsers=last 2 version!./~/sass-loader?outputStyle=expanded&sourceMap=true&sourceMapContents=true!./assets/index.scss",
"type": "cjs require",
"userRequest": "-!./../node_modules/css-loader/index.js?modules&importLoaders=2&sourceMap&localIdentName=[local]___[hash:base64:5]!./../node_modules/autoprefixer-loader/index.js?browsers=last 2 version!./../node_modules/sass-loader/index.js?outputStyle=expanded&sourceMap=true&sourceMapContents=true!normalize.css/normalize.css",
"loc": "3:10-332"
}
],
"source": "exports = module.exports = require(\"./../css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\\n/**\\n * 1. Set default font family to sans-serif.\\n * 2. Prevent iOS and IE text size adjust after device orientation change,\\n * without disabling user zoom.\\n */\\nhtml {\\n font-family: sans-serif;\\n /* 1 */\\n -ms-text-size-adjust: 100%;\\n /* 2 */\\n -webkit-text-size-adjust: 100%;\\n /* 2 */\\n}\\n\\n/**\\n * Remove default margin.\\n */\\nbody {\\n margin: 0;\\n}\\n\\n/* HTML5 display definitions\\n ========================================================================== */\\n/**\\n * Correct `block` display not defined for any HTML5 element in IE 8/9.\\n * Correct `block` display not defined for `details` or `summary` in IE 10/11\\n * and Firefox.\\n * Correct `block` display not defined for `main` in IE 11.\\n */\\narticle,\\naside,\\ndetails,\\nfigcaption,\\nfigure,\\nfooter,\\nheader,\\nhgroup,\\nmain,\\nmenu,\\nnav,\\nsection,\\nsummary {\\n display: block;\\n}\\n\\n/**\\n * 1. Correct `inline-block` display not defined in IE 8/9.\\n * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\\n */\\naudio,\\ncanvas,\\nprogress,\\nvideo {\\n display: inline-block;\\n /* 1 */\\n vertical-align: baseline;\\n /* 2 */\\n}\\n\\n/**\\n * Prevent modern browsers from displaying `audio` without controls.\\n * Remove excess height in iOS 5 devices.\\n */\\naudio:not([controls]) {\\n display: none;\\n height: 0;\\n}\\n\\n/**\\n * Address `[hidden]` styling not present in IE 8/9/10.\\n * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.\\n */\\n[hidden],\\ntemplate {\\n display: none;\\n}\\n\\n/* Links\\n ========================================================================== */\\n/**\\n * Remove the gray background color from active links in IE 10.\\n */\\na {\\n background-color: transparent;\\n}\\n\\n/**\\n * Improve readability of focused elements when they are also in an\\n * active/hover state.\\n */\\na:active,\\na:hover {\\n outline: 0;\\n}\\n\\n/* Text-level semantics\\n ========================================================================== */\\n/**\\n * Address styling not present in IE 8/9/10/11, Safari, and Chrome.\\n */\\nabbr[title] {\\n border-bottom: 1px dotted;\\n}\\n\\n/**\\n * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\\n */\\nb,\\nstrong {\\n font-weight: bold;\\n}\\n\\n/**\\n * Address styling not present in Safari and Chrome.\\n */\\ndfn {\\n font-style: italic;\\n}\\n\\n/**\\n * Address variable `h1` font-size and margin within `section` and `article`\\n * contexts in Firefox 4+, Safari, and Chrome.\\n */\\nh1 {\\n font-size: 2em;\\n margin: 0.67em 0;\\n}\\n\\n/**\\n * Address styling not present in IE 8/9.\\n */\\nmark {\\n background: #ff0;\\n color: #000;\\n}\\n\\n/**\\n * Address inconsistent and variable font size in all browsers.\\n */\\nsmall {\\n font-size: 80%;\\n}\\n\\n/**\\n * Prevent `sub` and `sup` affecting `line-height` in all browsers.\\n */\\nsub,\\nsup {\\n font-size: 75%;\\n line-height: 0;\\n position: relative;\\n vertical-align: baseline;\\n}\\n\\nsup {\\n top: -0.5em;\\n}\\n\\nsub {\\n bottom: -0.25em;\\n}\\n\\n/* Embedded content\\n ========================================================================== */\\n/**\\n * Remove border when inside `a` element in IE 8/9/10.\\n */\\nimg {\\n border: 0;\\n}\\n\\n/**\\n * Correct overflow not hidden in IE 9/10/11.\\n */\\nsvg:not(:root) {\\n overflow: hidden;\\n}\\n\\n/* Grouping content\\n ========================================================================== */\\n/**\\n * Address margin not present in IE 8/9 and Safari.\\n */\\nfigure {\\n margin: 1em 40px;\\n}\\n\\n/**\\n * Address differences between Firefox and other browsers.\\n */\\nhr {\\n box-sizing: content-box;\\n height: 0;\\n}\\n\\n/**\\n * Contain overflow in all browsers.\\n */\\npre {\\n overflow: auto;\\n}\\n\\n/**\\n * Address odd `em`-unit font size rendering in all browsers.\\n */\\ncode,\\nkbd,\\npre,\\nsamp {\\n font-family: monospace, monospace;\\n font-size: 1em;\\n}\\n\\n/* Forms\\n ========================================================================== */\\n/**\\n * Known limitation: by default, Chrome and Safari on OS X allow very limited\\n * styling of `select`, unless a `border` property is set.\\n */\\n/**\\n * 1. Correct color not being inherited.\\n * Known issue: affects color of disabled elements.\\n * 2. Correct font properties not being inherited.\\n * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\\n */\\nbutton,\\ninput,\\noptgroup,\\nselect,\\ntextarea {\\n color: inherit;\\n /* 1 */\\n font: inherit;\\n /* 2 */\\n margin: 0;\\n /* 3 */\\n}\\n\\n/**\\n * Address `overflow` set to `hidden` in IE 8/9/10/11.\\n */\\nbutton {\\n overflow: visible;\\n}\\n\\n/**\\n * Address inconsistent `text-transform` inheritance for `button` and `select`.\\n * All other form control elements do not inherit `text-transform` values.\\n * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\\n * Correct `select` style inheritance in Firefox.\\n */\\nbutton,\\nselect {\\n text-transform: none;\\n}\\n\\n/**\\n * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\\n * and `video` controls.\\n * 2. Correct inability to style clickable `input` types in iOS.\\n * 3. Improve usability and consistency of cursor style between image-type\\n * `input` and others.\\n */\\nbutton,\\nhtml input[type=\\\"button\\\"],\\ninput[type=\\\"reset\\\"],\\ninput[type=\\\"submit\\\"] {\\n -webkit-appearance: button;\\n /* 2 */\\n cursor: pointer;\\n /* 3 */\\n}\\n\\n/**\\n * Re-set default cursor for disabled elements.\\n */\\nbutton[disabled],\\nhtml input[disabled] {\\n cursor: default;\\n}\\n\\n/**\\n * Remove inner padding and border in Firefox 4+.\\n */\\nbutton::-moz-focus-inner,\\ninput::-moz-focus-inner {\\n border: 0;\\n padding: 0;\\n}\\n\\n/**\\n * Address Firefox 4+ setting `line-height` on `input` using `!important` in\\n * the UA stylesheet.\\n */\\ninput {\\n line-height: normal;\\n}\\n\\n/**\\n * It's recommended that you don't attempt to style these elements.\\n * Firefox's implementation doesn't respect box-sizing, padding, or width.\\n *\\n * 1. Address box sizing set to `content-box` in IE 8/9/10.\\n * 2. Remove excess padding in IE 8/9/10.\\n */\\ninput[type=\\\"checkbox\\\"],\\ninput[type=\\\"radio\\\"] {\\n box-sizing: border-box;\\n /* 1 */\\n padding: 0;\\n /* 2 */\\n}\\n\\n/**\\n * Fix the cursor style for Chrome's increment/decrement buttons. For certain\\n * `font-size` values of the `input`, it causes the cursor style of the\\n * decrement button to change from `default` to `text`.\\n */\\ninput[type=\\\"number\\\"]::-webkit-inner-spin-button,\\ninput[type=\\\"number\\\"]::-webkit-outer-spin-button {\\n height: auto;\\n}\\n\\n/**\\n * 1. Address `appearance` set to `searchfield` in Safari and Chrome.\\n * 2. Address `box-sizing` set to `border-box` in Safari and Chrome.\\n */\\ninput[type=\\\"search\\\"] {\\n -webkit-appearance: textfield;\\n /* 1 */\\n box-sizing: content-box;\\n /* 2 */\\n}\\n\\n/**\\n * Remove inner padding and search cancel button in Safari and Chrome on OS X.\\n * Safari (but not Chrome) clips the cancel button when the search input has\\n * padding (and `textfield` appearance).\\n */\\ninput[type=\\\"search\\\"]::-webkit-search-cancel-button,\\ninput[type=\\\"search\\\"]::-webkit-search-decoration {\\n -webkit-appearance: none;\\n}\\n\\n/**\\n * Define consistent border, margin, and padding.\\n */\\nfieldset {\\n border: 1px solid #c0c0c0;\\n margin: 0 2px;\\n padding: 0.35em 0.625em 0.75em;\\n}\\n\\n/**\\n * 1. Correct `color` not being inherited in IE 8/9/10/11.\\n * 2. Remove padding so people aren't caught out if they zero out fieldsets.\\n */\\nlegend {\\n border: 0;\\n /* 1 */\\n padding: 0;\\n /* 2 */\\n}\\n\\n/**\\n * Remove default vertical scrollbar in IE 8/9/10/11.\\n */\\ntextarea {\\n overflow: auto;\\n}\\n\\n/**\\n * Don't inherit the `font-weight` (applied by a rule above).\\n * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\\n */\\noptgroup {\\n font-weight: bold;\\n}\\n\\n/* Tables\\n ========================================================================== */\\n/**\\n * Remove most spacing between table cells.\\n */\\ntable {\\n border-collapse: collapse;\\n border-spacing: 0;\\n}\\n\\ntd,\\nth {\\n padding: 0;\\n}\\n\", \"\", {\"version\":3,\"sources\":[\"/./node_modules/normalize.css/node_modules/node_modules/normalize.css/normalize.css\",\"/./node_modules/normalize.css/node_modules/normalize.css/normalize.css\"],\"names\":[],\"mappings\":\"AAAA,4EAA4E;AAE5E;;;;GAIG;AAEH;EACE,wBAAwB;EAAE,OAAO;EACjC,2BAA2B;EAAE,OAAO;EACpC,+BAA+B;EAAE,OAAO;CACzC;;AAED;;GAEG;AAEH;EACE,UAAU;CACX;;AAED;gFACgF;AAEhF;;;;;GAKG;AAEH;;;;;;;;;;;;;EAaE,eAAe;CAChB;;AAED;;;GAGG;AAEH;;;;EAIE,sBAAsB;EAAE,OAAO;EAC/B,yBAAyB;EAAE,OAAO;CACnC;;AAED;;;GAGG;AAEH;EACE,cAAc;EACd,UAAU;CACX;;AAED;;;GAGG;ACDH;;EDKE,cAAc;CACf;;AAED;gFACgF;AAEhF;;GAEG;AAEH;EACE,8BAA8B;CAC/B;;AAED;;;GAGG;AAEH;;EAEE,WAAW;CACZ;;AAED;gFACgF;AAEhF;;GAEG;AAEH;EACE,0BAA0B;CAC3B;;AAED;;GAEG;AAEH;;EAEE,kBAAkB;CACnB;;AAED;;GAEG;AAEH;EACE,mBAAmB;CACpB;;AAED;;;GAGG;AAEH;EACE,eAAe;EACf,iBAAiB;CAClB;;AAED;;GAEG;AAEH;EACE,iBAAiB;EACjB,YAAY;CACb;;AAED;;GAEG;AAEH;EACE,eAAe;CAChB;;AAED;;GAEG;AAEH;;EAEE,eAAe;EACf,eAAe;EACf,mBAAmB;EACnB,yBAAyB;CAC1B;;AAED;EACE,YAAY;CACb;;AAED;EACE,gBAAgB;CACjB;;AAED;gFACgF;AAEhF;;GAEG;AAEH;EACE,UAAU;CACX;;AAED;;GAEG;AAEH;EACE,iBAAiB;CAClB;;AAED;gFACgF;AAEhF;;GAEG;AAEH;EACE,iBAAiB;CAClB;;AAED;;GAEG;AAEH;EACE,wBAAwB;EACxB,UAAU;CACX;;AAED;;GAEG;AAEH;EACE,eAAe;CAChB;;AAED;;GAEG;AAEH;;;;EAIE,kCAAkC;EAClC,eAAe;CAChB;;AAED;gFACgF;AAEhF;;;GAGG;AAEH;;;;;GAKG;AAEH;;;;;EAKE,eAAe;EAAE,OAAO;EACxB,cAAc;EAAE,OAAO;EACvB,UAAU;EAAE,OAAO;CACpB;;AAED;;GAEG;AAEH;EACE,kBAAkB;CACnB;;AAED;;;;;GAKG;AAEH;;EAEE,qBAAqB;CACtB;;AAED;;;;;;GAMG;AAEH;;;;EAIE,2BAA2B;EAAE,OAAO;EACpC,gBAAgB;EAAE,OAAO;CAC1B;;AAED;;GAEG;AAEH;;EAEE,gBAAgB;CACjB;;AAED;;GAEG;AAEH;;EAEE,UAAU;EACV,WAAW;CACZ;;AAED;;;GAGG;AAEH;EACE,oBAAoB;CACrB;;AAED;;;;;;GAMG;AAEH;;EAEE,uBAAuB;EAAE,OAAO;EAChC,WAAW;EAAE,OAAO;CACrB;;AAED;;;;GAIG;AAEH;;EAEE,aAAa;CACd;;AAED;;;GAGG;AAEH;EACE,8BAA8B;EAAE,OAAO;EACvC,wBAAwB;EAAE,OAAO;CAClC;;AAED;;;;GAIG;AAEH;;EAEE,yBAAyB;CAC1B;;AAED;;GAEG;AAEH;EACE,0BAA0B;EAC1B,cAAc;EACd,+BAA+B;CAChC;;AAED;;;GAGG;AAEH;EACE,UAAU;EAAE,OAAO;EACnB,WAAW;EAAE,OAAO;CACrB;;AAED;;GAEG;AAEH;EACE,eAAe;CAChB;;AAED;;;GAGG;AAEH;EACE,kBAAkB;CACnB;;AAED;gFACgF;AAEhF;;GAEG;AAEH;EACE,0BAA0B;EAC1B,kBAAkB;CACnB;;AAED;;EAEE,WAAW;CACZ\",\"file\":\"normalize.css\",\"sourcesContent\":[\"/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\\n\\n/**\\n * 1. Set default font family to sans-serif.\\n * 2. Prevent iOS and IE text size adjust after device orientation change,\\n * without disabling user zoom.\\n */\\n\\nhtml {\\n font-family: sans-serif; /* 1 */\\n -ms-text-size-adjust: 100%; /* 2 */\\n -webkit-text-size-adjust: 100%; /* 2 */\\n}\\n\\n/**\\n * Remove default margin.\\n */\\n\\nbody {\\n margin: 0;\\n}\\n\\n/* HTML5 display definitions\\n ========================================================================== */\\n\\n/**\\n * Correct `block` display not defined for any HTML5 element in IE 8/9.\\n * Correct `block` display not defined for `details` or `summary` in IE 10/11\\n * and Firefox.\\n * Correct `block` display not defined for `main` in IE 11.\\n */\\n\\narticle,\\naside,\\ndetails,\\nfigcaption,\\nfigure,\\nfooter,\\nheader,\\nhgroup,\\nmain,\\nmenu,\\nnav,\\nsection,\\nsummary {\\n display: block;\\n}\\n\\n/**\\n * 1. Correct `inline-block` display not defined in IE 8/9.\\n * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\\n */\\n\\naudio,\\ncanvas,\\nprogress,\\nvideo {\\n display: inline-block; /* 1 */\\n vertical-align: baseline; /* 2 */\\n}\\n\\n/**\\n * Prevent modern browsers from displaying `audio` without controls.\\n * Remove excess height in iOS 5 devices.\\n */\\n\\naudio:not([controls]) {\\n display: none;\\n height: 0;\\n}\\n\\n/**\\n * Address `[hidden]` styling not present in IE 8/9/10.\\n * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.\\n */\\n\\n[hidden],\\ntemplate {\\n display: none;\\n}\\n\\n/* Links\\n ========================================================================== */\\n\\n/**\\n * Remove the gray background color from active links in IE 10.\\n */\\n\\na {\\n background-color: transparent;\\n}\\n\\n/**\\n * Improve readability of focused elements when they are also in an\\n * active/hover state.\\n */\\n\\na:active,\\na:hover {\\n outline: 0;\\n}\\n\\n/* Text-level semantics\\n ========================================================================== */\\n\\n/**\\n * Address styling not present in IE 8/9/10/11, Safari, and Chrome.\\n */\\n\\nabbr[title] {\\n border-bottom: 1px dotted;\\n}\\n\\n/**\\n * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\\n */\\n\\nb,\\nstrong {\\n font-weight: bold;\\n}\\n\\n/**\\n * Address styling not present in Safari and Chrome.\\n */\\n\\ndfn {\\n font-style: italic;\\n}\\n\\n/**\\n * Address variable `h1` font-size and margin within `section` and `article`\\n * contexts in Firefox 4+, Safari, and Chrome.\\n */\\n\\nh1 {\\n font-size: 2em;\\n margin: 0.67em 0;\\n}\\n\\n/**\\n * Address styling not present in IE 8/9.\\n */\\n\\nmark {\\n background: #ff0;\\n color: #000;\\n}\\n\\n/**\\n * Address inconsistent and variable font size in all browsers.\\n */\\n\\nsmall {\\n font-size: 80%;\\n}\\n\\n/**\\n * Prevent `sub` and `sup` affecting `line-height` in all browsers.\\n */\\n\\nsub,\\nsup {\\n font-size: 75%;\\n line-height: 0;\\n position: relative;\\n vertical-align: baseline;\\n}\\n\\nsup {\\n top: -0.5em;\\n}\\n\\nsub {\\n bottom: -0.25em;\\n}\\n\\n/* Embedded content\\n ========================================================================== */\\n\\n/**\\n * Remove border when inside `a` element in IE 8/9/10.\\n */\\n\\nimg {\\n border: 0;\\n}\\n\\n/**\\n * Correct overflow not hidden in IE 9/10/11.\\n */\\n\\nsvg:not(:root) {\\n overflow: hidden;\\n}\\n\\n/* Grouping content\\n ========================================================================== */\\n\\n/**\\n * Address margin not present in IE 8/9 and Safari.\\n */\\n\\nfigure {\\n margin: 1em 40px;\\n}\\n\\n/**\\n * Address differences between Firefox and other browsers.\\n */\\n\\nhr {\\n box-sizing: content-box;\\n height: 0;\\n}\\n\\n/**\\n * Contain overflow in all browsers.\\n */\\n\\npre {\\n overflow: auto;\\n}\\n\\n/**\\n * Address odd `em`-unit font size rendering in all browsers.\\n */\\n\\ncode,\\nkbd,\\npre,\\nsamp {\\n font-family: monospace, monospace;\\n font-size: 1em;\\n}\\n\\n/* Forms\\n ========================================================================== */\\n\\n/**\\n * Known limitation: by default, Chrome and Safari on OS X allow very limited\\n * styling of `select`, unless a `border` property is set.\\n */\\n\\n/**\\n * 1. Correct color not being inherited.\\n * Known issue: affects color of disabled elements.\\n * 2. Correct font properties not being inherited.\\n * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\\n */\\n\\nbutton,\\ninput,\\noptgroup,\\nselect,\\ntextarea {\\n color: inherit; /* 1 */\\n font: inherit; /* 2 */\\n margin: 0; /* 3 */\\n}\\n\\n/**\\n * Address `overflow` set to `hidden` in IE 8/9/10/11.\\n */\\n\\nbutton {\\n overflow: visible;\\n}\\n\\n/**\\n * Address inconsistent `text-transform` inheritance for `button` and `select`.\\n * All other form control elements do not inherit `text-transform` values.\\n * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\\n * Correct `select` style inheritance in Firefox.\\n */\\n\\nbutton,\\nselect {\\n text-transform: none;\\n}\\n\\n/**\\n * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\\n * and `video` controls.\\n * 2. Correct inability to style clickable `input` types in iOS.\\n * 3. Improve usability and consistency of cursor style between image-type\\n * `input` and others.\\n */\\n\\nbutton,\\nhtml input[type=\\\"button\\\"], /* 1 */\\ninput[type=\\\"reset\\\"],\\ninput[type=\\\"submit\\\"] {\\n -webkit-appearance: button; /* 2 */\\n cursor: pointer; /* 3 */\\n}\\n\\n/**\\n * Re-set default cursor for disabled elements.\\n */\\n\\nbutton[disabled],\\nhtml input[disabled] {\\n cursor: default;\\n}\\n\\n/**\\n * Remove inner padding and border in Firefox 4+.\\n */\\n\\nbutton::-moz-focus-inner,\\ninput::-moz-focus-inner {\\n border: 0;\\n padding: 0;\\n}\\n\\n/**\\n * Address Firefox 4+ setting `line-height` on `input` using `!important` in\\n * the UA stylesheet.\\n */\\n\\ninput {\\n line-height: normal;\\n}\\n\\n/**\\n * It's recommended that you don't attempt to style these elements.\\n * Firefox's implementation doesn't respect box-sizing, padding, or width.\\n *\\n * 1. Address box sizing set to `content-box` in IE 8/9/10.\\n * 2. Remove excess padding in IE 8/9/10.\\n */\\n\\ninput[type=\\\"checkbox\\\"],\\ninput[type=\\\"radio\\\"] {\\n box-sizing: border-box; /* 1 */\\n padding: 0; /* 2 */\\n}\\n\\n/**\\n * Fix the cursor style for Chrome's increment/decrement buttons. For certain\\n * `font-size` values of the `input`, it causes the cursor style of the\\n * decrement button to change from `default` to `text`.\\n */\\n\\ninput[type=\\\"number\\\"]::-webkit-inner-spin-button,\\ninput[type=\\\"number\\\"]::-webkit-outer-spin-button {\\n height: auto;\\n}\\n\\n/**\\n * 1. Address `appearance` set to `searchfield` in Safari and Chrome.\\n * 2. Address `box-sizing` set to `border-box` in Safari and Chrome.\\n */\\n\\ninput[type=\\\"search\\\"] {\\n -webkit-appearance: textfield; /* 1 */\\n box-sizing: content-box; /* 2 */\\n}\\n\\n/**\\n * Remove inner padding and search cancel button in Safari and Chrome on OS X.\\n * Safari (but not Chrome) clips the cancel button when the search input has\\n * padding (and `textfield` appearance).\\n */\\n\\ninput[type=\\\"search\\\"]::-webkit-search-cancel-button,\\ninput[type=\\\"search\\\"]::-webkit-search-decoration {\\n -webkit-appearance: none;\\n}\\n\\n/**\\n * Define consistent border, margin, and padding.\\n */\\n\\nfieldset {\\n border: 1px solid #c0c0c0;\\n margin: 0 2px;\\n padding: 0.35em 0.625em 0.75em;\\n}\\n\\n/**\\n * 1. Correct `color` not being inherited in IE 8/9/10/11.\\n * 2. Remove padding so people aren't caught out if they zero out fieldsets.\\n */\\n\\nlegend {\\n border: 0; /* 1 */\\n padding: 0; /* 2 */\\n}\\n\\n/**\\n * Remove default vertical scrollbar in IE 8/9/10/11.\\n */\\n\\ntextarea {\\n overflow: auto;\\n}\\n\\n/**\\n * Don't inherit the `font-weight` (applied by a rule above).\\n * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\\n */\\n\\noptgroup {\\n font-weight: bold;\\n}\\n\\n/* Tables\\n ========================================================================== */\\n\\n/**\\n * Remove most spacing between table cells.\\n */\\n\\ntable {\\n border-collapse: collapse;\\n border-spacing: 0;\\n}\\n\\ntd,\\nth {\\n padding: 0;\\n}\\n\",\"/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\\n/**\\n * 1. Set default font family to sans-serif.\\n * 2. Prevent iOS and IE text size adjust after device orientation change,\\n * without disabling user zoom.\\n */\\nhtml {\\n font-family: sans-serif;\\n /* 1 */\\n -ms-text-size-adjust: 100%;\\n /* 2 */\\n -webkit-text-size-adjust: 100%;\\n /* 2 */\\n}\\n\\n/**\\n * Remove default margin.\\n */\\nbody {\\n margin: 0;\\n}\\n\\n/* HTML5 display definitions\\n ========================================================================== */\\n/**\\n * Correct `block` display not defined for any HTML5 element in IE 8/9.\\n * Correct `block` display not defined for `details` or `summary` in IE 10/11\\n * and Firefox.\\n * Correct `block` display not defined for `main` in IE 11.\\n */\\narticle,\\naside,\\ndetails,\\nfigcaption,\\nfigure,\\nfooter,\\nheader,\\nhgroup,\\nmain,\\nmenu,\\nnav,\\nsection,\\nsummary {\\n display: block;\\n}\\n\\n/**\\n * 1. Correct `inline-block` display not defined in IE 8/9.\\n * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\\n */\\naudio,\\ncanvas,\\nprogress,\\nvideo {\\n display: inline-block;\\n /* 1 */\\n vertical-align: baseline;\\n /* 2 */\\n}\\n\\n/**\\n * Prevent modern browsers from displaying `audio` without controls.\\n * Remove excess height in iOS 5 devices.\\n */\\naudio:not([controls]) {\\n display: none;\\n height: 0;\\n}\\n\\n/**\\n * Address `[hidden]` styling not present in IE 8/9/10.\\n * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.\\n */\\n[hidden],\\ntemplate {\\n display: none;\\n}\\n\\n/* Links\\n ========================================================================== */\\n/**\\n * Remove the gray background color from active links in IE 10.\\n */\\na {\\n background-color: transparent;\\n}\\n\\n/**\\n * Improve readability of focused elements when they are also in an\\n * active/hover state.\\n */\\na:active,\\na:hover {\\n outline: 0;\\n}\\n\\n/* Text-level semantics\\n ========================================================================== */\\n/**\\n * Address styling not present in IE 8/9/10/11, Safari, and Chrome.\\n */\\nabbr[title] {\\n border-bottom: 1px dotted;\\n}\\n\\n/**\\n * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\\n */\\nb,\\nstrong {\\n font-weight: bold;\\n}\\n\\n/**\\n * Address styling not present in Safari and Chrome.\\n */\\ndfn {\\n font-style: italic;\\n}\\n\\n/**\\n * Address variable `h1` font-size and margin within `section` and `article`\\n * contexts in Firefox 4+, Safari, and Chrome.\\n */\\nh1 {\\n font-size: 2em;\\n margin: 0.67em 0;\\n}\\n\\n/**\\n * Address styling not present in IE 8/9.\\n */\\nmark {\\n background: #ff0;\\n color: #000;\\n}\\n\\n/**\\n * Address inconsistent and variable font size in all browsers.\\n */\\nsmall {\\n font-size: 80%;\\n}\\n\\n/**\\n * Prevent `sub` and `sup` affecting `line-height` in all browsers.\\n */\\nsub,\\nsup {\\n font-size: 75%;\\n line-height: 0;\\n position: relative;\\n vertical-align: baseline;\\n}\\n\\nsup {\\n top: -0.5em;\\n}\\n\\nsub {\\n bottom: -0.25em;\\n}\\n\\n/* Embedded content\\n ========================================================================== */\\n/**\\n * Remove border when inside `a` element in IE 8/9/10.\\n */\\nimg {\\n border: 0;\\n}\\n\\n/**\\n * Correct overflow not hidden in IE 9/10/11.\\n */\\nsvg:not(:root) {\\n overflow: hidden;\\n}\\n\\n/* Grouping content\\n ========================================================================== */\\n/**\\n * Address margin not present in IE 8/9 and Safari.\\n */\\nfigure {\\n margin: 1em 40px;\\n}\\n\\n/**\\n * Address differences between Firefox and other browsers.\\n */\\nhr {\\n box-sizing: content-box;\\n height: 0;\\n}\\n\\n/**\\n * Contain overflow in all browsers.\\n */\\npre {\\n overflow: auto;\\n}\\n\\n/**\\n * Address odd `em`-unit font size rendering in all browsers.\\n */\\ncode,\\nkbd,\\npre,\\nsamp {\\n font-family: monospace, monospace;\\n font-size: 1em;\\n}\\n\\n/* Forms\\n ========================================================================== */\\n/**\\n * Known limitation: by default, Chrome and Safari on OS X allow very limited\\n * styling of `select`, unless a `border` property is set.\\n */\\n/**\\n * 1. Correct color not being inherited.\\n * Known issue: affects color of disabled elements.\\n * 2. Correct font properties not being inherited.\\n * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\\n */\\nbutton,\\ninput,\\noptgroup,\\nselect,\\ntextarea {\\n color: inherit;\\n /* 1 */\\n font: inherit;\\n /* 2 */\\n margin: 0;\\n /* 3 */\\n}\\n\\n/**\\n * Address `overflow` set to `hidden` in IE 8/9/10/11.\\n */\\nbutton {\\n overflow: visible;\\n}\\n\\n/**\\n * Address inconsistent `text-transform` inheritance for `button` and `select`.\\n * All other form control elements do not inherit `text-transform` values.\\n * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\\n * Correct `select` style inheritance in Firefox.\\n */\\nbutton,\\nselect {\\n text-transform: none;\\n}\\n\\n/**\\n * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\\n * and `video` controls.\\n * 2. Correct inability to style clickable `input` types in iOS.\\n * 3. Improve usability and consistency of cursor style between image-type\\n * `input` and others.\\n */\\nbutton,\\nhtml input[type=\\\"button\\\"],\\ninput[type=\\\"reset\\\"],\\ninput[type=\\\"submit\\\"] {\\n -webkit-appearance: button;\\n /* 2 */\\n cursor: pointer;\\n /* 3 */\\n}\\n\\n/**\\n * Re-set default cursor for disabled elements.\\n */\\nbutton[disabled],\\nhtml input[disabled] {\\n cursor: default;\\n}\\n\\n/**\\n * Remove inner padding and border in Firefox 4+.\\n */\\nbutton::-moz-focus-inner,\\ninput::-moz-focus-inner {\\n border: 0;\\n padding: 0;\\n}\\n\\n/**\\n * Address Firefox 4+ setting `line-height` on `input` using `!important` in\\n * the UA stylesheet.\\n */\\ninput {\\n line-height: normal;\\n}\\n\\n/**\\n * It's recommended that you don't attempt to style these elements.\\n * Firefox's implementation doesn't respect box-sizing, padding, or width.\\n *\\n * 1. Address box sizing set to `content-box` in IE 8/9/10.\\n * 2. Remove excess padding in IE 8/9/10.\\n */\\ninput[type=\\\"checkbox\\\"],\\ninput[type=\\\"radio\\\"] {\\n box-sizing: border-box;\\n /* 1 */\\n padding: 0;\\n /* 2 */\\n}\\n\\n/**\\n * Fix the cursor style for Chrome's increment/decrement buttons. For certain\\n * `font-size` values of the `input`, it causes the cursor style of the\\n * decrement button to change from `default` to `text`.\\n */\\ninput[type=\\\"number\\\"]::-webkit-inner-spin-button,\\ninput[type=\\\"number\\\"]::-webkit-outer-spin-button {\\n height: auto;\\n}\\n\\n/**\\n * 1. Address `appearance` set to `searchfield` in Safari and Chrome.\\n * 2. Address `box-sizing` set to `border-box` in Safari and Chrome.\\n */\\ninput[type=\\\"search\\\"] {\\n -webkit-appearance: textfield;\\n /* 1 */\\n box-sizing: content-box;\\n /* 2 */\\n}\\n\\n/**\\n * Remove inner padding and search cancel button in Safari and Chrome on OS X.\\n * Safari (but not Chrome) clips the cancel button when the search input has\\n * padding (and `textfield` appearance).\\n */\\ninput[type=\\\"search\\\"]::-webkit-search-cancel-button,\\ninput[type=\\\"search\\\"]::-webkit-search-decoration {\\n -webkit-appearance: none;\\n}\\n\\n/**\\n * Define consistent border, margin, and padding.\\n */\\nfieldset {\\n border: 1px solid #c0c0c0;\\n margin: 0 2px;\\n padding: 0.35em 0.625em 0.75em;\\n}\\n\\n/**\\n * 1. Correct `color` not being inherited in IE 8/9/10/11.\\n * 2. Remove padding so people aren't caught out if they zero out fieldsets.\\n */\\nlegend {\\n border: 0;\\n /* 1 */\\n padding: 0;\\n /* 2 */\\n}\\n\\n/**\\n * Remove default vertical scrollbar in IE 8/9/10/11.\\n */\\ntextarea {\\n overflow: auto;\\n}\\n\\n/**\\n * Don't inherit the `font-weight` (applied by a rule above).\\n * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\\n */\\noptgroup {\\n font-weight: bold;\\n}\\n\\n/* Tables\\n ========================================================================== */\\n/**\\n * Remove most spacing between table cells.\\n */\\ntable {\\n border-collapse: collapse;\\n border-spacing: 0;\\n}\\n\\ntd,\\nth {\\n padding: 0;\\n}\\n\"],\"sourceRoot\":\"webpack://\"}]);\n\n// exports\n"
}, |
Yes, thanks, that's what was required. So, tomorrow I'll implement some hacky |
I'm finishing the fix for this. |
Problem is only with files from node_modules, local files are loaded normally. https://github.com/necolas/normalize.css/ ./assets/index.scss// FAIL
@import 'normalize.css/normalize.css';
// FAIL
@import 'basscss-base-reset/index.css';
// OK
@import './test.scss';
// OK
@import './test.css';
:global {
body {
background-color: #FFFFFF;
}
}
.content {
margin: 50px 0;
} |
Well, i've installed the npm module, but it says it's not found:
Can you post your webpack config? |
hello, I'm having problem using the css module. Here is my config
However, this is the error that I got from console.
|
@christiansakai Yes, this is the same bug. |
I've just released v 2.1.0 |
Hello, it is going ok now, but with bloated output during development and
Outputdevelopment mode |
Yes, webpack stats are now always generated because they're always needed. |
@halt-hammerzeit I am using this with https://github.com/erikras/react-redux-universal-hot-example and I am still getting error even with latest 2.1.0 For me it seems it is somehow related to this issue, am I right? |
@korczis yes, that's probably because my PR hasn't yet been merged into the master branch. |
@halt-hammerzeit Oh, I see, thank you for clarification. |
It was in my comment... development mode |
@solcik oh, I get it now: my debugging console output made it's way to a release. |
|
@solcik oh, one more bug |
Ok now. Thanks for the effort and quick response! |
Hello again.) I played a little bit and here is result: I prepared my repo on github, created pullrequest, travis is enabled and each pullrequest is deploying new application on heroku, so in pull request you can see something like There is configuration, output from my terminal after running locally (you can look on Travis too) and changed files ofcourse in each pull request. In the end of terminal output I logged returned value from the import of There are different variants of setup:
Import of this file is from package https://github.com/basscss/base-reset. @import 'basscss-base-reset/index.css'; https://github.com/solcik/js-universal/pull/6 |
Oh, I see, a lot of testing you made. Ok, so
|
I will investigate these a little bit deeper. https://github.com/solcik/js-universal/pull/8 You can see this behaviour in https://github.com/solcik/js-universal/pull/10 So I think there should be only one parser from your library - this one In that case https://github.com/solcik/js-universal/pull/10 and https://github.com/solcik/js-universal/pull/11 will no longer be an issue, and there is only https://github.com/solcik/js-universal/pull/9 to fix.. (I will investigate little more) Do you agree? |
oh, i see. As for the two errors you mentioned in the previous post: they are the same and they are a Webpack error, which is not related to |
try the @latest and here is the result
|
@christiansakai ok, so it tries to evaluate |
@halt-hammerzeit here is my
|
I deleted the
|
@christiansakai Well, it clearly states in the modules source that |
|
@halt-hammerzeit which this is what I have in my webpack config
and webpack-isomorphic-tools-config
|
@christiansakai
or this (if you are using css modules feature):
|
I did it and still got this error, probably because I want to try using postcss?
|
@christiansakai No. You need to place |
@halt-hammerzeit
|
@christiansakai Yes, now it works, but of course |
ah I see. okay then. Thanks! I'll report to postcss-loader repo Thanks for the awesome work @halt-hammerzeit |
By the way, I've just released |
So for https://github.com/solcik/js-universal/pull/9 I am terribly sorry, because I did not read README for sass, less loaders, as they clearly states this... https://github.com/solcik/js-universal/commit/6c59f3d989262b632b64314619812bbd521acb59 I checked back with 2.0.2 of your library and problem was still there even with |
@solcik Yeah, I guess. |
FYI |
@halt-hammerzeit, nice one. Thanks for update/sharing. On Saturday, 21 May 2016, Nikolay notifications@github.com wrote: This e-mail is intended for the named recipient(s). It may contain privileged and/or confidential information. If you are not one of the intended recipients, please notify the sender immediately and destroy this e-mail and attachment(s): you must not copy, distribute, retain or take any action in reliance upon the email or attachment(s). While all reasonable efforts are made to safeguard inbound and outbound e-mails, Tomas Korcak cannot guarantee that attachments are virus-free or are compatible with your systems, and does not accept liability in respect of viruses or computer problems experienced. Thank you. Your Skills In Reading Have Improved +1 Some days you're the dog; some days you're the hydrant. |
Hello,
I wanted to use your
css_modules_loader_parser
, and took inspiration from your pull.https://github.com/erikras/react-redux-universal-hot-example/pull/463/files
Config
FAIL
Development:
Error:
Production:
Error:
OK
Development:
Production:
The text was updated successfully, but these errors were encountered: