Fix build process for mapbox gl

This commit is contained in:
lukasmartinelli
2016-09-10 16:05:04 +02:00
parent 0e65ac8937
commit e4049fa5da
8 changed files with 49 additions and 31 deletions

View File

@@ -24,19 +24,6 @@ loaders.push({
'sass'
]
});
// Mapbox GL
loaders.push({
test: /\.json$/,
loader: 'json-loader'
});
loaders.push({
test: /\.js$/,
include: path.resolve('node_modules/mapbox-gl-shaders/index.js'),
loader: 'transform/cacheable?brfs'
});
// local css modules
loaders.push({
test: /[\/\\]src[\/\\].*\.css/,
@@ -61,17 +48,20 @@ module.exports = {
alias: {
'webworkify': 'webworkify-webpack',
// TODO: otherwise I get a max call stack error in browser?
'mapbox-gl': path.resolve('./node_modules/mapbox-gl/dist/mapbox-gl.js')
// 'mapbox-gl': path.resolve('./node_modules/mapbox-gl/dist/mapbox-gl.js')
},
extensions: ['', '.js', '.jsx']
},
module: {
loaders,
postLoaders: [{
include: /node_modules\/mapbox-gl-shaders/,
loader: 'transform',
query: 'brfs'
}]
include: /node_modules\/mapbox-gl-shaders/,
loader: 'transform',
query: 'brfs'
}]
},
node: {
fs: "empty"
},
devServer: {
contentBase: "./public",