Skip to content

Commit

Permalink
fixes bootstrap glyiphicons without hardcoding public path
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Welch committed Jul 21, 2016
1 parent 8c5a173 commit 4029e8b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/bootstrap-public-path.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Created by welchk on 7/20/16.
*/
__webpack_public_path__ = window.location.protocol + "//" + window.location.host + "/";
2 changes: 1 addition & 1 deletion src/components/NotFoundPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const NotFoundPage = () => {
return (
<div>
<h4>
404 Page Not Found
404 Page Not Found <span className="glyphicon glyphicon-alert"></span>
</h4>
<Link to="/"> Go back to homepage </Link>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-disable import/default */

import React from 'react';
import {render} from 'react-dom';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import routes from './routes';
import configureStore from './store/configureStore';
require('./favicon.ico'); // Tell webpack to load favicon.ico
import 'bootstrap/dist/css/bootstrap.css';
import './styles/styles.scss'; // Yep, that's right. You can import SASS/CSS files too! Webpack will run the associated loader and plug this into the page.
import { syncHistoryWithStore } from 'react-router-redux';

Expand Down
2 changes: 1 addition & 1 deletion webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ export default {
devtool: 'cheap-module-eval-source-map', // more info:https://webpack.github.io/docs/build-performance.html#sourcemaps and https://webpack.github.io/docs/configuration.html#devtool
noInfo: true, // set to false to see a list of every file being bundled.
entry: [
'./src/bootstrap-public-path',
'webpack-hot-middleware/client?reload=true',
'./src/index'
],
target: 'web', // necessary per https://webpack.github.io/docs/testing.html#compile-and-test
output: {
path: `${__dirname}/src`, // Note: Physical files are only output by the production build task `npm run build`.
publicPath: 'http://localhost:3000/', // Use absolute paths to avoid the way that URLs are resolved by Chrome when they're parsed from a dynamically loaded CSS blob. Note: Only necessary in Dev.
filename: 'bundle.js'
},
plugins: [
Expand Down

0 comments on commit 4029e8b

Please sign in to comment.