Skip to content

[WIP] refactor(loader): v2.0.0 #639

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

Closed
wants to merge 6 commits into from
Closed

[WIP] refactor(loader): v2.0.0 #639

wants to merge 6 commits into from

Conversation

joshwiens
Copy link
Member

@joshwiens joshwiens commented Dec 5, 2017

What kind of change does this PR introduce?

Did you add tests for your changes?

If relevant, did you update the README?

Summary

Does this PR introduce a breaking change?

Other information

  • Fixes for Webpack 4.x
  • Drops support for NodeJS 4.x
  • Sets minimum peerDep to Webpack 3.x

BREAKING CHANGE: Sets engines to "node": ">= 6.9.0 || >= 8.9.0"
BREAKING CHANGE: Drops support for Webpack v2.x

@joshwiens joshwiens changed the title [WIP] CSS Loader v1 [WIP] CSS Loader Webpack 4.x compatibility Dec 5, 2017
@michael-ciniawsky michael-ciniawsky changed the title [WIP] CSS Loader Webpack 4.x compatibility [WIP] refactor(loader): v1.0.0 Jan 4, 2018
@michael-ciniawsky
Copy link
Member

michael-ciniawsky commented Jan 4, 2018

Noteable Changes

Features

url (options.url)

file.css

.selector {
  background-url: url('path/to/file.png');
}

file.js

import CSS__URL__0 from 'path/to/file.png';

export default `.selector { background-url: url(${CSS__URL__0}); }`

import (options.import)

file.css

@import './path/to/import.css';

...css

file.js

import CSS__IMPORT__0 from 'path/to/import.css';

export default `${css}`

sourceMap (options.sourceMap)

  • enable/disable source maps

BREAKING CHANGES

root (options.root)

  • Removed

alias (options.alias)

  • Removed (needs triage)

modules (options.modules|options.localIdentName|options.camelCase)

  • Removed (will be a separate plugin usable via postcss-loader)

minimize (options.minimize)

  • Removed

importLoaders (options.importLoaders)

  • Removed (not needed anymore webpack >= v2.0.0)

Issues

ALL 😛

TODO

  • Upstream
  • plugins/url.js => postcss-icss-url (PR #?)
  • plugins/import.js =>postcss-icss-import (PR #?)
  • Triage && Add CSS Runtime

Status

Name Status
Default
CSS URLs
CSS Imports
CSS Runtime
Options - url
Options - import
Options - sourceMap

@ZeeCoder
Copy link

ZeeCoder commented Apr 2, 2018

@michael-ciniawsky any way I can help with this? I believe this would include custom exports support.

"postcss-modules-scope": "^1.1.0",
"postcss-modules-values": "^1.3.0",
"loader-utils": "^1.1.0",
"postcss": "^6.0.15",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line would solve #691 in my case at least.

@alexander-akait alexander-akait modified the milestones: 1.0.0, 2.0.0 Jul 4, 2018
@michael-ciniawsky
Copy link
Member

michael-ciniawsky commented Aug 7, 2018

Closing in favor of #748 (for now)

⚠️ Please still don't deleted the branch yet

@michael-ciniawsky michael-ciniawsky removed this from the 2.0.0 milestone Aug 7, 2018
@michael-ciniawsky michael-ciniawsky changed the title [WIP] refactor(loader): v1.0.0 [WIP] refactor(loader): v2.0.0 Aug 7, 2018
@michael-ciniawsky michael-ciniawsky deleted the next branch August 8, 2018 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants