maputnik/config/webpack.loaders.js

44 lines
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)/,
loaders: ['react-hot-loader/webpack']
},
{
test: /\.jsx?$/,
2017-07-11 07:30:37 +02:00
exclude: /(.*node_modules(?![\/\\]@mapbox[\/\\]mapbox-gl-style-spec)|bower_components|public)/,
2017-11-07 12:05:30 +01:00
loader: 'babel-loader',
query: {
2017-11-07 12:05:30 +01:00
presets: ['env', 'react'],
plugins: ['transform-runtime', 'transform-decorators-legacy', 'transform-class-properties'],
}
},
{
2016-12-31 10:34:32 +01:00
test: /\.(eot|ttf|woff|woff2)$/,
2017-11-07 12:05:30 +01:00
loader: 'file-loader?name=fonts/[name].[ext]'
},
{
2016-12-31 10:34:32 +01:00
test: /\.ico$/,
2017-11-07 12:05:30 +01:00
loader: 'file-loader?name=[name].[ext]'
},
{
2016-12-31 10:34:32 +01:00
test: /\.(svg|gif|jpg|png)$/,
2017-11-07 12:05:30 +01:00
loader: 'file-loader?name=img/[name].[ext]'
},
{
test: /\.json$/,
loader: 'json-loader'
},
2017-01-10 21:28:30 +01:00
{
test: /[\/\\](node_modules|global|src)[\/\\].*\.scss$/,
loaders: ["style-loader", "css-loader", "sass-loader"]
},
2016-12-22 18:19:34 +01:00
{
test: /[\/\\](node_modules|global|src)[\/\\].*\.css$/,
loaders: [
2017-11-07 12:05:30 +01:00
'style-loader?sourceMap',
'css-loader'
2016-12-22 18:19:34 +01:00
]
}
2015-06-15 15:21:19 +02:00
];