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

How to use with extractTextPlugin? #2

Open
vekexasia opened this issue Jun 28, 2017 · 2 comments
Open

How to use with extractTextPlugin? #2

vekexasia opened this issue Jun 28, 2017 · 2 comments

Comments

@vekexasia
Copy link

If i try to use extractText('style.css') I get

      throw new Error(`extractText(): No loaders found to extract contents from. Looking for loaders matching ${ruleToMatch.test}`)
@vekexasia vekexasia changed the title How to use extractTextPlugin? How to use with extractTextPlugin? Jun 28, 2017
@foxbunny
Copy link
Owner

Sorry for not answering this before, it's completely slipped my mind. I no longer use webpack-blocks and .vue files, so I don't have much interest in maintaining this package. If you submit a PR, I'll be happy to merge and publish.

@CumpsD
Copy link
Contributor

CumpsD commented Sep 24, 2017

I solved it by not using the extractText from webpack-blocks but having a simplified version:

const ExtractTextPlugin = require('extract-text-webpack-plugin');

module.exports = extractText

function extractText (outputFilePattern = 'css/[name].[contenthash:8].css') {
  var plugins = [
    new ExtractTextPlugin({
      filename: outputFilePattern,
      allChunks: true
    })
  ];

  return (context, util) => util.merge({ plugins });
};

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

No branches or pull requests

3 participants