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

2.0.0-exports.1 reverted back to old format #281

Closed
jguddas opened this issue Mar 6, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@jguddas
Copy link

commented Mar 6, 2017

the changes reopen previously fixed #238

 exports.default = function (loaders) {
-  var fallbackLoader = void 0;
-  if (loaders[0].startsWith('style')) {
-    fallbackLoader = 'style-loader';
-  } else if (loaders[0].startsWith('isomorphic-style')) {
-    fallbackLoader = 'isomorphic-style-loader';
-  } else {
-    throw new Error('\nIf you want to use \'extract-text-webpack-plugin\', make sure\nyour \'styleLoaders\' array starts with \'style\' or \'isomorphic-style\' at index 0.\n    ');
+  if (!loaders[0].startsWith('style')) {
+    throw new Error('\nIf you want to use \'extract-text-webpack-plugin\' make sure\nyour \'styleLoaders\' array have \'style-loader\' at index 0.\n    ');
   }
 
   var ExtractTextPlugin = void 0;
@@ -19,10 +14,10 @@ exports.default = function (loaders) {
     // eslint-disable-next-line global-require
     ExtractTextPlugin = require('extract-text-webpack-plugin');
   } catch (error) {
-    throw new Error('\nCould not find \'extract-text-webpack-plugin\' module.\nMake sure it\'s installed in your \'node_modules/\' directory.\nError: ' + error + '\n');
+    throw new Error('\nCould not find \'extract-text-webpack-plugin\' module.\nMake sure it\'s installed in your \'node_modules/\' directory.\n    ');
   }
   var restLoaders = loaders.slice(1).map(function (loader) {
     return loader + '!';
   }).join('');
-  return [ExtractTextPlugin.loader().loader + '?{"omit":1,"remove":true}', fallbackLoader, restLoaders].join('!');
+  return ExtractTextPlugin.extract({ fallbackLoader: 'style', loader: restLoaders });
 };
@justin808

This comment has been minimized.

Copy link
Member

commented Mar 6, 2017

@jguddas Any chance that you can give me a PR?

@jguddas

This comment has been minimized.

Copy link
Author

commented Mar 7, 2017

the workaround used in 2.0.0-exports.1 was 77550cf and we should quickly add it back in so we don't break any projects depending on bootstrap-loader@2.0.0-exports.1

@justin808

This comment has been minimized.

Copy link
Member

commented Mar 7, 2017

@jguddas I might have a chance to research this tomorrow.

We want to ONLY support webpack v2.2+ going forward. It's impossible to support all the intermediate versions.

@justin808 justin808 closed this Mar 14, 2017

@justin808

This comment has been minimized.

Copy link
Member

commented Mar 14, 2017

@jguddas Let me know if you upgrading fixes your issue. We're not going to maintain fixes for beta versions of webpack.

@jguddas

This comment has been minimized.

Copy link
Author

commented Mar 22, 2017

@justin808 v2.0.0 works like a charm 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.