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

Order of vendor imports #165

Open
jakub-astrahit opened this issue Jan 26, 2018 · 1 comment
Open

Order of vendor imports #165

jakub-astrahit opened this issue Jan 26, 2018 · 1 comment

Comments

@jakub-astrahit
Copy link

Hi, shouldn't the order of vendor asset imports (Bootstrap 4 for example) be different?
For instance, I was trying to apply a className to an HTML element and the classes from Bootstrap overrode my custom styles for the element. Most likely because I applied my custom styles first, but then overrode them by Bootstrap 4 styles.

Here's my Bootstrap 4 import in this file src\vendor\main.ts:
require('./bootstrap/bootstrap.min.css')

And I had to change the order in config\webpack\dev.js from this:

entry: {
    app: [
      'webpack-hot-middleware/client?reload=true',
      './src/client.tsx',
      './src/vendor/main.ts'
    ]
  },

to this (note that the path to vendor main.ts file is earlier in the list than the client):

entry: {
    app: [
      'webpack-hot-middleware/client?reload=true',
      './src/vendor/main.ts',
      './src/client.tsx'
    ]
  },

Similarly, I had to modify config\webpack\prod.js. So what do you think? Shouldn't this order be a default one in this repo?

Thanks.

@bherila
Copy link
Contributor

bherila commented Jan 26, 2018

This is a good point, I couldn't get my custom styles to work at all, and resorted to a hack using Helmet and just including the bootstrap css from CDN in <head>...

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

2 participants