summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorNick Van Doorn <vandoorn.nick@gmail.com>2017-05-17 18:30:15 -0700
committerNick Van Doorn <vandoorn.nick@gmail.com>2017-05-17 18:30:15 -0700
commita0d336e9fcc04e5e439bdd009e70694a8ed0435b (patch)
tree9cea5dc6f7df9c1ae7a36c304bb3edb464e3acfe /config
parentc0eb199b83fa5a7c9b9e3155ebbb0e38cb23edff (diff)
Fix font-loading
Diffstat (limited to 'config')
-rw-r--r--config/webpack.config.js28
1 files changed, 19 insertions, 9 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 6b7780d..8abdb59 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -11,23 +11,32 @@ module.exports = {
devtool: 'source-map',
entry: './src/index.js',
output: {
- filename: './static/bundle.js',
+ filename: 'bundle.js',
path: BUILD_PATH
},
module: {
- rules: [{
+ rules: [
+ {
+ test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
+ use: ['file-loader']
+ },
+ {
exclude: [
+ /\.ttf$/,
+ /\.eot$/,
/\.html$/,
/\.(js|jsx)$/,
/\.css$/,
/\.json$/,
/\.svg$/
],
- loader: 'url',
- query: {
- limit: 10000,
- name: 'static/media/[name].[hash:8].[ext]'
- }
+ use: [{
+ loader:'url-loader',
+ query: {
+ limit: 10000,
+ name: 'media/[name].[hash:8].[ext]'
+ }
+ }]
},
{
test: /\.(js|jsx)$/,
@@ -69,7 +78,8 @@ module.exports = {
include: SRC_PATH,
use: [{
loader: 'babel-loader',
- query: {
+ options: {
+ plugins: ['transform-decorators-legacy'],
presets: [
'es2015',
'react'
@@ -80,7 +90,7 @@ module.exports = {
}]
},
plugins: [
- new ExtractTextPlugin('./static/style.css'),
+ new ExtractTextPlugin('style.css'),
new HtmlWebpackPlugin({
template: path.join(PUBLIC_PATH, 'index.html'),
inject: 'body'