maputnik/webpack.loaders.js

50 lines
1.1 KiB
JavaScript
Raw Normal View History

2015-06-15 15:21:19 +02:00
module.exports = [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components|public)/,
2016-11-23 16:04:00 +01:00
loaders: ['react-hot-loader/webpack']
2015-06-15 15:21:19 +02:00
},
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components|public)/,
loader: 'babel',
query: {
presets: ['es2015', 'react'],
plugins: ['transform-runtime', 'transform-decorators-legacy', 'transform-class-properties'],
}
},
{
2016-11-23 21:02:04 +01:00
test: /\.(eot|svg|ttf|woff|woff2)$/,
loader: 'file?name=fonts/[name].[ext]'
2015-06-15 15:21:19 +02:00
},
{
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
exclude: /(node_modules|bower_components)/,
loader: "url?limit=10000&mimetype=image/svg+xml"
},
{
test: /\.gif/,
exclude: /(node_modules|bower_components)/,
loader: "url-loader?limit=10000&mimetype=image/gif"
},
{
test: /\.jpg/,
exclude: /(node_modules|bower_components)/,
loader: "url-loader?limit=10000&mimetype=image/jpg"
},
{
test: /\.png/,
exclude: /(node_modules|bower_components)/,
loader: "url-loader?limit=10000&mimetype=image/png"
2016-09-10 16:05:04 +02:00
},
{
test: /\.json$/,
loader: 'json-loader'
},
{
test: /\.js$/,
include: '/node_modules/mapbox-gl-shaders/index.js',
loader: 'transform/cacheable?brfs'
2015-06-15 15:21:19 +02:00
}
];