Skip to content

Commit

Permalink
Merge pull request #207 from kwelch/bootstrap-support
Browse files Browse the repository at this point in the history
Support bootstrap glyiphicons without hardcoding public path
  • Loading branch information
coryhouse authored Jul 21, 2016
2 parents 0322e74 + 2f6f679 commit 092151e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/webpack-public-path.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Created by welchk on 7/20/16.
*/
// below we dynamically set the webpack public path at runtime
// documentation: http://webpack.github.io/docs/configuration.html#output-publicpath
// eslint-disable-next-line no-undef
__webpack_public_path__ = window.location.protocol + "//" + window.location.host + "/";
3 changes: 2 additions & 1 deletion webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ 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: [
// must be first entry to properly set public path
'./src/webpack-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 092151e

Please sign in to comment.