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

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

Open
andrewplummer opened this issue Jul 8, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@andrewplummer
Copy link

commented Jul 8, 2019

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.

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.