Skip to content

No way to have multiple themes when working with Webpack. #67

@andrewplummer

Description

@andrewplummer

Hi... first off thanks for the awesome library. The concept is fanstaic. However some of the implementation such as reversing the imports for the config (ie. importing theme.config from the "inside out" -- from inside the node module into your source directory) make it very brittle to use with webpack it would seem. First off, is the only approach really to use webpack's resolve.alias? Aside from feeling hacky, it leads to situations like where I want to compile multiple entry points and it doesn't seem possible... for example:

  resolve: {
    alias: {
      '../../theme.config$': path.resolve('./src/app1/theme.config'),
      '../../theme.config$': path.resolve('./src/app2/theme.config')
    }
  },

What is the official way to resolve the conflict with the above 2 lines? Yes of course I could split the webpack entry points out to different webpack configs but then I would lose the benefit of chunking as well as a lot of other hassles to deal with.

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