Skip to content

Multiple entrypoints with one output file per entrypoint #116

@ezzatron

Description

@ezzatron

Is this supported by MCEP? It was possible in ETP, because each loader was tied to an instance of the plugin:

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

const themeA = path.resolve(__dirname, 'src/theme-a.scss')
const themeB = path.resolve(__dirname, 'src/theme-b.scss')

const extractA = new ExtractTextPlugin({filename: 'theme-a.css'})
const extractB = new ExtractTextPlugin({filename: 'theme-b.css'})

module.exports = {
  entry: [themeA, themeB],
  module: {
    rules: [
      {
        test: themeA, 
        loader: extractA.extract({use: ['css-loader', 'sass-loader']}),
      },
      {
        test: themeB, 
        loader: extractB.extract({use: ['css-loader', 'sass-loader']}),
      },
    ],
  },
  plugins: [extractA, extractB]
}

But MCEP I'm not sure if it's possible to achieve the same thing, because there is only one loader (MiniCssExtractPlugin.loader), and so it cannot distinguish which inputs belong to which instance of MiniCssExtractPlugin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy