Skip to content

Commit

Permalink
fix(build): 修复 extract-text-webpack-plugin 版本问题
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhaoju committed Sep 8, 2017
1 parent 720e7cf commit f01e720
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 39 deletions.
2 changes: 1 addition & 1 deletion lib/models/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var _createClass3 = _interopRequireDefault(_createClass2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin-ignore-order');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');

var normalize = require('../utils/path').normalize;
Expand Down
5 changes: 2 additions & 3 deletions lib/models/Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ var fs = require('fs');

var Config = require('./Config.js');
var Manager = require('../modules/manager.js');
var ExtractTextPlugin = require('extract-text-webpack-plugin-ignore-order');
var originExtractTextPlugin = require('extract-text-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');

var UtilFs = require('../utils/fs.js');
var UtilPath = require('../utils/path.js');
Expand Down Expand Up @@ -407,7 +406,7 @@ var Project = function () {

// 如果没有 ExtractTextPlugin 则为项目添加一个
var isExtractTextPluginExists = config.plugins.some(function (plugin) {
return plugin instanceof originExtractTextPlugin;
return plugin instanceof ExtractTextPlugin;
});
if (!isExtractTextPluginExists) {
config.plugins.push(new ExtractTextPlugin(config.output.filename.replace('[ext]', '.css')));
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ykit",
"version": "0.6.0",
"version": "0.6.1",
"description": "高可用高扩展前端开发工具",
"main": "src/ykit.js",
"bin": {
Expand Down Expand Up @@ -30,7 +30,6 @@
"eslint": "2.13.1",
"extend": "^3.0.0",
"extract-text-webpack-plugin": "^1.0.1",
"extract-text-webpack-plugin-ignore-order": "^1.1.1",
"fs-extra": "^1.0.0",
"globby": "^5.0.0",
"html-loader": "^0.4.3",
Expand Down
2 changes: 1 addition & 1 deletion src/models/Config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin-ignore-order');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');

const normalize = require('../utils/path').normalize;
Expand Down
5 changes: 2 additions & 3 deletions src/models/Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ const fs = require('fs');

const Config = require('./Config.js');
const Manager = require('../modules/manager.js');
const ExtractTextPlugin = require('extract-text-webpack-plugin-ignore-order');
const originExtractTextPlugin = require('extract-text-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');

const UtilFs = require('../utils/fs.js');
const UtilPath = require('../utils/path.js');
Expand Down Expand Up @@ -389,7 +388,7 @@ class Project {

// 如果没有 ExtractTextPlugin 则为项目添加一个
const isExtractTextPluginExists = config.plugins.some((plugin) => {
return plugin instanceof originExtractTextPlugin;
return plugin instanceof ExtractTextPlugin;
});
if(!isExtractTextPluginExists) {
config.plugins.push(new ExtractTextPlugin(config.output.filename.replace('[ext]', '.css')));
Expand Down
29 changes: 0 additions & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1999,15 +1999,6 @@ extglob@^0.3.1:
dependencies:
is-extglob "^1.0.0"

extract-text-webpack-plugin-ignore-order@^1.1.1:
version "1.1.1"
resolved "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/extract-text-webpack-plugin-ignore-order/-/extract-text-webpack-plugin-ignore-order-1.1.1.tgz#32afcacb95608f0abc35e175530c5bde71e2f59f"
dependencies:
async "^1.5.0"
loader-utils "^0.2.3"
webpack "^1.12.2"
webpack-sources "^0.1.0"

extract-text-webpack-plugin@^1.0.1:
version "1.0.1"
resolved "http://registry.npm.corp.qunar.com/extract-text-webpack-plugin/download/extract-text-webpack-plugin-1.0.1.tgz#c95bf3cbaac49dc96f1dc6e072549fbb654ccd2c"
Expand Down Expand Up @@ -5645,26 +5636,6 @@ [email protected]:
watchpack "^0.2.1"
webpack-core "~0.6.9"

webpack@^1.12.2:
version "1.15.0"
resolved "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/webpack/-/webpack-1.15.0.tgz#4ff31f53db03339e55164a9d468ee0324968fe98"
dependencies:
acorn "^3.0.0"
async "^1.3.0"
clone "^1.0.2"
enhanced-resolve "~0.9.0"
interpret "^0.6.4"
loader-utils "^0.2.11"
memory-fs "~0.3.0"
mkdirp "~0.5.0"
node-libs-browser "^0.7.0"
optimist "~0.6.0"
supports-color "^3.1.0"
tapable "~0.1.8"
uglify-js "~2.7.3"
watchpack "^0.2.1"
webpack-core "~0.6.9"

whet.extend@~0.9.9:
version "0.9.9"
resolved "http://registry.npm.corp.qunar.com/whet.extend/download/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1"
Expand Down

0 comments on commit f01e720

Please sign in to comment.