-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Question: Why require node_modules to be in the sass path? #847
Comments
What's wrong with Webpack 3? There shouldn't be any re-inventing here. It's a major because of an internal breaking change. Now, that change could be what is causing your issue and you simply need to wait for the extensions to get fixed. |
Yeah I don't know what changed. All I know is my workaround no longer works. But it was a workaround after all, so I guess it was little fragile. Everything else seems to work with my same webpack config, just not the path. I'm getting errors like this:
|
What is the "workaround" in question? If you're talking about the include paths in the config, that's exactly what is recommended. So, that means something has happened in Webpack 3 to make it work differently. |
I described the workaround in the original post, with the link to the github issue. There is a bug with sass loader that is preventing me from adding paths in the context of my application. But there is an open issue with that project, as it is not the fault of this project. If you'd like to help out, you're welcome to join the discussion at webpack-contrib/sass-loader#466 ! But the main point of my issue here is that I'd like to know if we can change the import statements in this project to use relative paths instead of absolute? That is the way it is most often done, and I can't see any downsides to refactoring it that way. |
Hard-coded relative paths aren't a good option. As that them enforces a required directory structure which may not exist. Looks like there is some work going on in #830 to make a script to hot-rewrite the imports to be relative if needed. Not sure how to use what is currently merged for that though. |
@Garbee is correct in why we use @Material imports. He is also correct in that #830 and #831. If you would like to use the script, it appears that all it expects is a path to the root of your project. cc: @lynnjepsen correct me if I'm wrong. Closing |
I'll check into it. Thanks for the input! |
## The devDependency [css-loader](https://github.com/webpack-contrib/css-loader) was updated from `1.0.1` to `2.0.0`. This version is **not covered** by your **current version range**. If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update. --- <details> <summary>Release Notes for v2.0.0</summary> <p><a name="user-content-2.0.0"></a></p> <h1><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/compare/v1.0.1...v2.0.0">2.0.0</a> (2018-12-07)</h1> <p>The main <strong>BREAKING CHANGES</strong>:</p> <ul> <li>css modules <strong>are disabled by default</strong>, you need setup their use <code>modules</code> option. You can setup their using <code>local</code> (<code>true</code> is alias for this value) and <code>global</code> (previous behaviour) value. Why it is disabled by default? A lot of developers use <code>css</code> without css modules features and they get performance problems due <code>postcss</code> plugins spend time on analyze and processing file.</li> <li>resolving logic for <code>uls()</code> and <code>import</code> at-rules works the same everywhere, it does not matter whether css modules are enabled (with <code>global</code> and <code>local</code> module) or not. Examples - <code>url('image.png')</code> as <code>require('./image.png')</code>, <code>url('./image.png')</code> as <code>require('./image.png')</code>, <code>url('~module/image.png')</code> as <code>require('module/image.png')</code>.</li> </ul> <h3>Bug Fixes</h3> <ul> <li>broken unucode characters (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/850" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/850/hovercard">#850</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/f599c70">f599c70</a>)</li> <li>correctly processing <code>urls()</code> with <code>?#hash</code> (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/803" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/803/hovercard">#803</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/417d105">417d105</a>)</li> <li>don't break loader on invalid or not exists url or import token (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/827" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/827/hovercard">#827</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/9e52d26">9e52d26</a>)</li> <li>don't duplicate import with same media in different case (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/819" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/819/hovercard">#819</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/9f66e33">9f66e33</a>)</li> <li>emit warnings on broken <code>import</code> at-rules (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/806" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/806/hovercard">#806</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/4bdf08b">4bdf08b</a>)</li> <li>handle uppercase <code>URL</code> in <code>import</code> at-rules (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/818" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/818/hovercard">#818</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/3ebdcd5">3ebdcd5</a>)</li> <li>inconsistent generate class names for css modules on difference os (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/812" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/812/hovercard">#812</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/0bdf9b7">0bdf9b7</a>)</li> <li>reduce number of <code>require</code> for <code>urls()</code> (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/854" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/854/hovercard">#854</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/3338656">3338656</a>)</li> <li>support deduplication of string module ids (optimization.namedModules) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/789" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/789/hovercard">#789</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/e3bb83a">e3bb83a</a>)</li> <li>support module resolution in <code>composes</code> (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/845" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/845/hovercard">#845</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/453248f">453248f</a>)</li> <li>same <code>urls()</code> resolving logic for <code>modules</code> (<code>local</code> and <code>global</code>) and without modules (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/843" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/843/hovercard">#843</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/fdcf687">fdcf687</a>)</li> </ul> <h3>Features</h3> <ul> <li>allow to disable css modules and <strong>disable their by default</strong> (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/842" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/842/hovercard">#842</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/889dc7f">889dc7f</a>)</li> <li>disable <code>import</code> option doesn't affect on <code>composes</code> (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/822" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/822/hovercard">#822</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/f9aa73c">f9aa73c</a>)</li> <li>allow to filter <code>urls</code> (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/856" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/856/hovercard">#856</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/5e702e7">5e702e7</a>)</li> <li>allow to filter <code>import</code> at-rules (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/857" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/857/hovercard">#857</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/5e6034c">5e6034c</a>)</li> <li>emit warning on invalid <code>urls()</code> (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/832" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/832/hovercard">#832</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/da95db8">da95db8</a>)</li> <li>added <code>exportOnlyLocals</code> option (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/824" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/824/hovercard">#824</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/e9327c0">e9327c0</a>)</li> <li>reuse <code>postcss</code> ast from other loaders (i.e <code>postcss-loader</code>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/840" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/840/hovercard">#840</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/1dad1fb">1dad1fb</a>)</li> <li>schema options (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/b97d997">b97d997</a>)</li> </ul> <h3>BREAKING CHANGES</h3> <ul> <li>resolving logic for <code>uls()</code> and <code>import</code> at-rules works the same everywhere, it does not matter whether css modules are enabled (with <code>global</code> and <code>local</code> module) or not. Examples - <code>url('image.png')</code> as <code>require('./image.png')</code>, <code>url('./image.png')</code> as <code>require('./image.png')</code>, <code>url('~module/image.png')</code> as <code>require('module/image.png')</code>.</li> <li>by default css modules are disabled (now <code>modules: false</code> disable all css modules features), you can return old behaviour change this on <code>modules: 'global'</code></li> <li><code>css-loader/locals</code> was dropped in favor <code>exportOnlyLocals</code> option</li> <li><code>import</code> option only affect on <code>import</code> at-rules and doesn't affect on <code>composes</code> declarations</li> <li>invalid <code>@import</code> at rules now emit warnings</li> <li>use <code>postcss@7</code></li> </ul> <h3>Bonus</h3> <ul> <li>code refactoring, updating deps and reusing <code>postcss</code> ast increase performance</li> </ul> </details> <details> <summary>Commits</summary> <p>The new version differs by 67 commits.</p> <ul> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/634ab49c17b284e55e62105109412ebd37e234b5"><code>634ab49</code></a> <code>chore(release): 2.0.0</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/6ade2d0e7c04031c79841f1f741d986430a5aed7"><code>6ade2d0</code></a> <code>refactor: remove unused file (#860)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/e7525c90718018b75321f1e04909d6937b6ad140"><code>e7525c9</code></a> <code>test: nested url (#859)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/7259faa89dc70830d69b7eb7baf4163065b63679"><code>7259faa</code></a> <code>test: css hacks (#858)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/5e6034cee840d47dbfd9fdede87a152e4cfc466a"><code>5e6034c</code></a> <code>feat: allow to filter import at-rules (#857)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/5e702e7d2e081b7f6d372f0c967fdfca6a40a584"><code>5e702e7</code></a> <code>feat: allow filtering urls (#856)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/9642aa5ad70282f5a7bef8e95ceefdc834af1af1"><code>9642aa5</code></a> <code>test: css stuff (#855)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/333865645e21c15e8589724317111d9d6badbeba"><code>3338656</code></a> <code>fix: reduce number of require for url (#854)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/533abbe8cf2b937751f3d4501816611a230083d2"><code>533abbe</code></a> <code>test: issue 636 (#853)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/08c551cc78bb484a4f947047cbc46b305e733d7e"><code>08c551c</code></a> <code>refactor: better warning on invalid url resolution (#852)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/b0aa159cbb951774a2c09b37f093dd95d23ebbd3"><code>b0aa159</code></a> <code>test: issue #589 (#851)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/f599c7087466ca293989531805ef367b388d13f1"><code>f599c70</code></a> <code>fix: broken unucode characters (#850)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/1e551f338bf6a22541e3dab7943429b01cae02ab"><code>1e551f3</code></a> <code>test: issue 286 (#849)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/419d27b0836be683a1f0cc786ec47e7f80617842"><code>419d27b</code></a> <code>docs: improve readme (#848)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/d94a698d9d144fb91a9d1fdfb8cd4433e410e70e"><code>d94a698</code></a> <code>refactor: webpack-default (#847)</code></li> </ul> <p>There are 67 commits in total.</p> <p>See the <a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/compare/10c3bc31bedcfffe35a8e65e82397d4dd632f6c0...634ab49c17b284e55e62105109412ebd37e234b5">full diff</a></p> </details> <details> <summary>FAQ and help</summary> There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new). </details> --- Your [Greenkeeper](https://greenkeeper.io) bot 🌴
…#4153) ## The devDependency [css-loader](https://github.com/webpack-contrib/css-loader) was updated from `1.0.1` to `2.0.0`. This version is **not covered** by your **current version range**. If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update. --- <details> <summary>Release Notes for v2.0.0</summary> <p><a name="user-content-2.0.0"></a></p> <h1><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/compare/v1.0.1...v2.0.0">2.0.0</a> (2018-12-07)</h1> <p>The main <strong>BREAKING CHANGES</strong>:</p> <ul> <li>css modules <strong>are disabled by default</strong>, you need setup their use <code>modules</code> option. You can setup their using <code>local</code> (<code>true</code> is alias for this value) and <code>global</code> (previous behaviour) value. Why it is disabled by default? A lot of developers use <code>css</code> without css modules features and they get performance problems due <code>postcss</code> plugins spend time on analyze and processing file.</li> <li>resolving logic for <code>uls()</code> and <code>import</code> at-rules works the same everywhere, it does not matter whether css modules are enabled (with <code>global</code> and <code>local</code> module) or not. Examples - <code>url('image.png')</code> as <code>require('./image.png')</code>, <code>url('./image.png')</code> as <code>require('./image.png')</code>, <code>url('~module/image.png')</code> as <code>require('module/image.png')</code>.</li> </ul> <h3>Bug Fixes</h3> <ul> <li>broken unucode characters (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/850" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/850/hovercard">material-components#850</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/f599c70">f599c70</a>)</li> <li>correctly processing <code>urls()</code> with <code>?#hash</code> (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/803" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/803/hovercard">material-components#803</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/417d105">417d105</a>)</li> <li>don't break loader on invalid or not exists url or import token (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/827" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/827/hovercard">material-components#827</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/9e52d26">9e52d26</a>)</li> <li>don't duplicate import with same media in different case (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/819" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/819/hovercard">material-components#819</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/9f66e33">9f66e33</a>)</li> <li>emit warnings on broken <code>import</code> at-rules (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/806" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/806/hovercard">material-components#806</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/4bdf08b">4bdf08b</a>)</li> <li>handle uppercase <code>URL</code> in <code>import</code> at-rules (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/818" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/818/hovercard">material-components#818</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/3ebdcd5">3ebdcd5</a>)</li> <li>inconsistent generate class names for css modules on difference os (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/812" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/812/hovercard">material-components#812</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/0bdf9b7">0bdf9b7</a>)</li> <li>reduce number of <code>require</code> for <code>urls()</code> (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/854" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/854/hovercard">material-components#854</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/3338656">3338656</a>)</li> <li>support deduplication of string module ids (optimization.namedModules) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/789" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/789/hovercard">material-components#789</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/e3bb83a">e3bb83a</a>)</li> <li>support module resolution in <code>composes</code> (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/845" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/845/hovercard">material-components#845</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/453248f">453248f</a>)</li> <li>same <code>urls()</code> resolving logic for <code>modules</code> (<code>local</code> and <code>global</code>) and without modules (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/843" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/843/hovercard">material-components#843</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/fdcf687">fdcf687</a>)</li> </ul> <h3>Features</h3> <ul> <li>allow to disable css modules and <strong>disable their by default</strong> (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/842" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/842/hovercard">material-components#842</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/889dc7f">889dc7f</a>)</li> <li>disable <code>import</code> option doesn't affect on <code>composes</code> (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/822" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/822/hovercard">material-components#822</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/f9aa73c">f9aa73c</a>)</li> <li>allow to filter <code>urls</code> (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/856" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/856/hovercard">material-components#856</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/5e702e7">5e702e7</a>)</li> <li>allow to filter <code>import</code> at-rules (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/857" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/857/hovercard">material-components#857</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/5e6034c">5e6034c</a>)</li> <li>emit warning on invalid <code>urls()</code> (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/832" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/832/hovercard">material-components#832</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/da95db8">da95db8</a>)</li> <li>added <code>exportOnlyLocals</code> option (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/824" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/824/hovercard">material-components#824</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/e9327c0">e9327c0</a>)</li> <li>reuse <code>postcss</code> ast from other loaders (i.e <code>postcss-loader</code>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/issues/840" data-hovercard-type="pull_request" data-hovercard-url="/webpack-contrib/css-loader/pull/840/hovercard">material-components#840</a>) (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/1dad1fb">1dad1fb</a>)</li> <li>schema options (<a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/b97d997">b97d997</a>)</li> </ul> <h3>BREAKING CHANGES</h3> <ul> <li>resolving logic for <code>uls()</code> and <code>import</code> at-rules works the same everywhere, it does not matter whether css modules are enabled (with <code>global</code> and <code>local</code> module) or not. Examples - <code>url('image.png')</code> as <code>require('./image.png')</code>, <code>url('./image.png')</code> as <code>require('./image.png')</code>, <code>url('~module/image.png')</code> as <code>require('module/image.png')</code>.</li> <li>by default css modules are disabled (now <code>modules: false</code> disable all css modules features), you can return old behaviour change this on <code>modules: 'global'</code></li> <li><code>css-loader/locals</code> was dropped in favor <code>exportOnlyLocals</code> option</li> <li><code>import</code> option only affect on <code>import</code> at-rules and doesn't affect on <code>composes</code> declarations</li> <li>invalid <code>@import</code> at rules now emit warnings</li> <li>use <code>postcss@7</code></li> </ul> <h3>Bonus</h3> <ul> <li>code refactoring, updating deps and reusing <code>postcss</code> ast increase performance</li> </ul> </details> <details> <summary>Commits</summary> <p>The new version differs by 67 commits.</p> <ul> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/634ab49c17b284e55e62105109412ebd37e234b5"><code>634ab49</code></a> <code>chore(release): 2.0.0</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/6ade2d0e7c04031c79841f1f741d986430a5aed7"><code>6ade2d0</code></a> <code>refactor: remove unused file (material-components#860)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/e7525c90718018b75321f1e04909d6937b6ad140"><code>e7525c9</code></a> <code>test: nested url (material-components#859)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/7259faa89dc70830d69b7eb7baf4163065b63679"><code>7259faa</code></a> <code>test: css hacks (material-components#858)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/5e6034cee840d47dbfd9fdede87a152e4cfc466a"><code>5e6034c</code></a> <code>feat: allow to filter import at-rules (material-components#857)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/5e702e7d2e081b7f6d372f0c967fdfca6a40a584"><code>5e702e7</code></a> <code>feat: allow filtering urls (material-components#856)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/9642aa5ad70282f5a7bef8e95ceefdc834af1af1"><code>9642aa5</code></a> <code>test: css stuff (material-components#855)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/333865645e21c15e8589724317111d9d6badbeba"><code>3338656</code></a> <code>fix: reduce number of require for url (material-components#854)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/533abbe8cf2b937751f3d4501816611a230083d2"><code>533abbe</code></a> <code>test: issue 636 (material-components#853)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/08c551cc78bb484a4f947047cbc46b305e733d7e"><code>08c551c</code></a> <code>refactor: better warning on invalid url resolution (material-components#852)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/b0aa159cbb951774a2c09b37f093dd95d23ebbd3"><code>b0aa159</code></a> <code>test: issue material-components#589 (material-components#851)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/f599c7087466ca293989531805ef367b388d13f1"><code>f599c70</code></a> <code>fix: broken unucode characters (material-components#850)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/1e551f338bf6a22541e3dab7943429b01cae02ab"><code>1e551f3</code></a> <code>test: issue 286 (material-components#849)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/419d27b0836be683a1f0cc786ec47e7f80617842"><code>419d27b</code></a> <code>docs: improve readme (material-components#848)</code></li> <li><a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/commit/d94a698d9d144fb91a9d1fdfb8cd4433e410e70e"><code>d94a698</code></a> <code>refactor: webpack-default (material-components#847)</code></li> </ul> <p>There are 67 commits in total.</p> <p>See the <a href="https://urls.greenkeeper.io/webpack-contrib/css-loader/compare/10c3bc31bedcfffe35a8e65e82397d4dd632f6c0...634ab49c17b284e55e62105109412ebd37e234b5">full diff</a></p> </details> <details> <summary>FAQ and help</summary> There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new). </details> --- Your [Greenkeeper](https://greenkeeper.io) bot 🌴 (cherry picked from commit 4afb87c)
I know this has come up several time, but I'd like to know why this was decided:
I am using this project with webpack and vue. In order to add node_modules to the path in this context took me several days to figure out. In the end, I found it was a bug with sass loader, and found the solution buried in an issue someone filed: webpack-contrib/sass-loader#412 . I added this line to my webpack config and got it working: (even though this was not the documented way to do it)
scss: 'vue-style-loader!css-loader!sass-loader?{"includePaths":["./node_modules"]}',
Well webpack 3.0 has come out, and I have to solve this problem all over again! I've already poured a good 4 hours into it, and still haven't found a solution.
So back to my original question, is there a good reason why this was decided? I'm about to throw in the towel and use a different framework. But obviously I really don't want to because this project has been so great in every other way.
It seems like it would be so easy to rewrite the paths to be relative instead of based on what's in the path. For example
@import "@material/theme/mixins";
would become@import "../../theme/mixins";
If given the green light, I would submit the pull request!
The text was updated successfully, but these errors were encountered: