Novice
Novice

Reputation: 478

Extract text plugin specify input folder webpack

 config.module.rules.push({
  test: /\.css$/,
  include: [
    path.resolve(__dirname, 'static/styles/vendor'),
  ],
  use: ExtractTextPlugin.extract({
    loader: 'css-loader',
  }),
});
config.plugins.push(new ExtractTextPlugin('/static/styles/vendor/foundation.css'));

unable to get the exact folder to loop over , if I exclude the include option it creates an output file with all css of the app

Directory structure enter image description here

Upvotes: 0

Views: 66

Answers (1)

vidit
vidit

Reputation: 703

ExtractTextPlugin works only for files imported in your javascript. Are you sure your static content is imported in any of your js file?

Upvotes: 1

Related Questions