Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

refactor: apply webpack-defaults #48

Closed
wants to merge 28 commits into from
Closed

Conversation

joshwiens
Copy link
Member

Intended to be merged & released as a part of 1.0.0 on a beta dist-tag once this has been finished and properly tested.

BREAKING CHANGE:

Enforces NodeJS > 4.3 via engines

Closes #47

Dan Forster and others added 28 commits May 27, 2015 01:16
Add Installation section on readme
making sure source is string before parsing
updated installation instructions
Create LICENSE file so GitHub displays its icon
Update README with -loader suffix to reflect Webpack 2 change
docs(README): refactor for webpack v2
Fix maintainer HTML syntax (doc was broken)
.replace(/\u2028/g, '\\u2028')
.replace(/\u2029/g, '\\u2029');
value = options.stringify ? `'${value}'` : value;
const module = this.version && this.version >= 2 ? `export default ${value};` : `module.exports = ${value};`;
Copy link
Member

Choose a reason for hiding this comment

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

webpack 2 has JSON support in core, so better display a warning to about that && remove json-loader from webpack.config.js

if (this.version && this.version < 2)
  const module = `module.exports = ${value};`;
  return cb(null, module)
}

this.emitWarning(`message`)
return cb(null, value) // not 100% about that :)

@joshwiens
Copy link
Member Author

So given webpack > 2 has native json support, we should probably skip the defaults upgrade and just throw an deprecation warning for 2.x.

The defaults upgrade is of no benefit to webpack 1.x.

@michael-ciniawsky
Copy link
Member

Yep or that I can do a separate PR with the warning etc

@michael-ciniawsky
Copy link
Member

michael-ciniawsky commented Apr 9, 2017

I think we should also check json5-loader in terms of webpack 2 compatibility, here @json-loader I closed a few issue because of json-loader usage + webpack 2 core JSON support conflicting

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet