-
Notifications
You must be signed in to change notification settings - Fork 1
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
Attempted to add Bootstrap to app #8
Conversation
…k.config.js, imported bootstrap.css in main.js
@@ -1,10 +1,9 @@ | |||
var React = require('react'); | |||
var styles = require('./App.css'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's continue to use this line to require our styles for the app.
@@ -1,5 +1,7 @@ | |||
import React from 'react'; | |||
import ReactDOM from 'react-dom'; | |||
import App from './App.js'; | |||
import Bootstrap from './bootstrap/dist/css/bootstrap.css' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line isn't required
@@ -6,6 +6,7 @@ | |||
<title>Zero Waste</title> | |||
<meta name="description" content="We're reaching zero waste... and having fun doing it"> | |||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||
<link rel = "stylesheet" href="bootstrap/dist/css/bootstrap.css"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove Line -Webpack will handle all of our assets (CSS/JS) for the app.
@Noewel In most of our files JS/CSS we should be able to require or import require styles and libs. Take a look at facebook/create-react-app#301 (comment) So adding the bootstrap repo isn't required. |
@@ -1,10 +1,9 @@ | |||
var React = require('react'); | |||
var styles = require('./App.css'); | |||
var styles = require('./bootstrap/dist/css/bootstrap.css'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See facebook/create-react-app#301 (comment)
Installed file-loader and url-loader dependencies, Added loaders to webpack.config.js, Imported bootstrap into main.js. I downloaded the compiled and minified CSS, JavaScript, and fonts from getbootstrap.com and dropped them into the app folder(Not entirely sure if this was necessary; probably why there are so many changed files).