Skip to content
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

Initial Webpack3 support #706

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
@@ -1,3 +1,3 @@
/node_modules/
/dist/
node_modules/
dist/
npm-debug.log
8 changes: 5 additions & 3 deletions .travis.yml
Expand Up @@ -4,14 +4,16 @@ node_js:
- "5"
- "6"
env:
- WEBPACK_VERSION=1
- WEBPACK_VERSION=2
- WEBPACK_VERSION=1 EXTRACT_TEXT_VERSION=$WEBPACK_VERSION
- WEBPACK_VERSION=2 EXTRACT_TEXT_VERSION=$WEBPACK_VERSION
- WEBPACK_VERSION=3 EXTRACT_TEXT_VERSION=^2.1.2
before_install:
- stty columns 120
install:
- npm install --ignore-scripts
- npm rm webpack
- npm rm extract-text-webpack-plugin
- npm install webpack@$WEBPACK_VERSION extract-text-webpack-plugin@$WEBPACK_VERSION --ignore-scripts || true
- npm install webpack@$WEBPACK_VERSION --ignore-scripts
- npm install extract-text-webpack-plugin@$EXTRACT_TEXT_VERSION --ignore-scripts
script:
- npm test
2 changes: 1 addition & 1 deletion examples/build-examples.js
Expand Up @@ -12,7 +12,7 @@ var rimraf = require('rimraf');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');

if (webpackMajorVersion === '2') {
if (webpackMajorVersion >= '2') {
var extractOriginal = ExtractTextPlugin.extract;
ExtractTextPlugin.extract = function (fallback, use) {
return extractOriginal({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -63,6 +63,6 @@
"toposort": "^1.0.0"
},
"peerDependencies": {
"webpack": "1 || ^2 || ^2.1.0-beta || ^2.2.0-rc"
"webpack": "1 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3"
}
}
2 changes: 1 addition & 1 deletion spec/BasicSpec.js
Expand Up @@ -21,7 +21,7 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
var HtmlWebpackPlugin = require('../index.js');

if (webpackMajorVersion === '2') {
if (webpackMajorVersion >= '2') {
var extractOriginal = ExtractTextPlugin.extract;
ExtractTextPlugin.extract = function (fallback, use) {
return extractOriginal({
Expand Down