Level 53
It could be the old issue with relative vs absolute paths. Check your leading slashes.
1 like
After deploying to a live server (set up on a 'develop' branch, local not prod) I found that bootstrap fonts were not being loaded correctly. This seems to work fine on my local environment...
Failed to decode downloaded font: http://dev.test.com/fonts/glyphicons-halflings-regular.woff2
/#/:1 OTS parsing error: invalid version tag
/#/:1 Failed to decode downloaded font: http://dev.test.com/fonts/glyphicons-halflings-regular.woff2
/#/:1 OTS parsing error: invalid version tag
/#/:1 Failed to decode downloaded font: http://dev.test.com/fonts/glyphicons-halflings-regular.woff
/#/:1 OTS parsing error: invalid version tag
/#/:1 Failed to decode downloaded font: http://dev.test.com/fonts/glyphicons-halflings-regular.woff
/#/:1 OTS parsing error: invalid version tag
/#/:1 Failed to decode downloaded font: http://dev.test.com/fonts/glyphicons-halflings-regular.ttf
/#/:1 OTS parsing error: invalid version tag
/#/:1 Failed to decode downloaded font: http://dev.test.com/fonts/glyphicons-halflings-regular.ttf
/#/:1 OTS parsing error: invalid version tag
And in my gulpfile:
mix.copy('node_modules/bootstrap/dist/fonts', 'public/build/fonts');
mix.copy('node_modules/font-awesome/fonts', 'public/build/fonts');
Local webpack.config.js:
module.exports = {
entry: __dirname + "/index.js",
output: {
path: __dirname + "/",
filename: "specs.js"
},
module: {
loaders: [
{ test: /.js/, exclude: /node_modules/, loader: 'babel', query: {presets: [['es2015', {modules: false}]]}},
{ test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "url-loader?limit=10000&minetype=application/font-woff" },
{ test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader" }
]
}
};
Any idea on what the culprit may be? Not sure why the fonts aren't being loaded.
It could be the old issue with relative vs absolute paths. Check your leading slashes.
Please or to participate in this conversation.