Skip to content

Conversation

@bholloway
Copy link
Owner

A large change, intended as non-breaking.

  • support sass-loader@>=6.0.0 (backward compatible)
  • support less-loader (string source-map)
  • attempt support for webpack2

Supersedes #31, #41, #44.
Hopefully fixes #36, #42.

Will probably be a major version bump to play it safe: discuss.

@Judahmeek
Copy link

Judahmeek commented Feb 15, 2017

Yarn won't let me pull af4b4fc because it comes after the latest version bump 1.6.1. Would you mind adding another version bump to make things more convenient?

This PR definitely has my vote, btw.

@bholloway
Copy link
Owner Author

@Judahmeek I prefer not to mess with pre-release because of how easy it is to break latest dist-tag.

I have reports from others that this is a good fix, so I will probably release on that basis. (There are always unexpected issues that need to be patched following.) Anyone can please let me know if they object to that plan.

@bholloway
Copy link
Owner Author

There is still an incompatibility with webpack@~1.0.0 and node-sass@>=4.0.0. I have updated dependencies (in case it is fixed in source-maps) but to no avail.

According to this comment by @jhnns it is a known issue. However it would be nice if I could get independent confirmation that it is not just my setup.

In the absence of further information I intend to adjust the readme.md to give guidance that users with Webpack 1 and SASS loader may be limited to node-sass@~3.0.0, and to then release. Again let me know any objections/suggestions.

@bholloway bholloway merged commit 2c10fd6 into master Feb 16, 2017
@bholloway bholloway deleted the feature/support-sass-loader-6 branch February 16, 2017 06:48
@bholloway
Copy link
Owner Author

Published as 2.0.0. Let me know any problems.

@BerndWessels
Copy link

@bholloway Just updated to [email protected] and [email protected] and its breaking :(

Before it worked just fine with sass-loader-5.0.1 and resolve-url-loader-1.6.1.

Any idea how to fix it?

This is my webpack config:

config.module.rules.push(
      {
        test: /(\.scss|\.css)$/,
        exclude: [/node_modules/, /normalize.css/, /icomoon/],
        loader: `style-loader!css-loader?{"sourceMap":true,"modules":true, "importLoaders":2, "localIdentName": "[path]---[name]---[local]---[hash:base64:5]"}!postcss-loader!resolve-url-loader!sass-loader?{"sourceMap":true,"includePaths":["${themePath}"]}`
      }

And this is the error (I get multiple of these errors, basically for each import):

ERROR in ./~/css-loader?{"sourceMap":true,"modules":true, "importLoaders":2, "localIdentName": "[path]---[name]---[local]---[hash:base64:5]"}!./~/postcss-loader!./~/sass-loader/lib/loader.js?{"sourceMap":true,"includePaths":["C:/git/microsite-template-react/micros
ite/themes/fraedom"]}!./src/components/date-picker/days/styles.scss
Module build failed: SyntaxError: Bad string at line 1 column 44 of the JSON5 data. Still to read: "microsite-template-r"
    at error (C:\git\microsite-template-react\microsite\node_modules\json5\lib\json5.js:56:25)
    at string (C:\git\microsite-template-react\microsite\node_modules\json5\lib\json5.js:268:13)
    at value (C:\git\microsite-template-react\microsite\node_modules\json5\lib\json5.js:487:20)
    at array (C:\git\microsite-template-react\microsite\node_modules\json5\lib\json5.js:417:36)
    at value (C:\git\microsite-template-react\microsite\node_modules\json5\lib\json5.js:484:20)
    at object (C:\git\microsite-template-react\microsite\node_modules\json5\lib\json5.js:459:35)
    at value (C:\git\microsite-template-react\microsite\node_modules\json5\lib\json5.js:482:20)
    at Object.parse (C:\git\microsite-template-react\microsite\node_modules\json5\lib\json5.js:508:18)
    at parseQuery (C:\git\microsite-template-react\microsite\node_modules\sass-loader\node_modules\loader-utils\lib\parseQuery.js:20:16)
    at Object.getOptions (C:\git\microsite-template-react\microsite\node_modules\sass-loader\node_modules\loader-utils\lib\getOptions.js:8:10)
    at normalizeOptions (C:\git\microsite-template-react\microsite\node_modules\sass-loader\lib\normalizeOptions.js:21:37)
    at Object.sassLoader (C:\git\microsite-template-react\microsite\node_modules\sass-loader\lib\loader.js:40:21)
 @ ./src/components/date-picker/days/styles.scss 4:14-418 13:2-17:4 14:20-424
 @ ./src/components/date-picker/days/component.js
 @ ./src/components/date-picker/component.js
 @ ./src/components/date-input/component.js
 @ ./src/containers/demo-page/component.js
 @ ./src/component.js
 @ ./src/root.client.js
 @ multi babel-polyfill react-hot-loader/patch webpack-hot-middleware/client ./src/root.client.js

And these are my package versions:

@bholloway
Copy link
Owner Author

bholloway commented Feb 24, 2017 via email

@BerndWessels
Copy link

@bholloway Hi thanks, no worries.

It seems I've got a problem with my sass-loader "includePaths":["${themePath}"] which is most likely unrelated to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

webpack 2.1.0-beta23+ breaks loader.options.output.path

4 participants