Created
June 16, 2017 02:48
-
-
Save helmi03/8dd3201c2d36315ca24477dde5329ed3 to your computer and use it in GitHub Desktop.
webpack.config.js for https://github.com/mapbox/mapbox-gl-directions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path') | |
module.exports = { | |
context: __dirname, | |
output: { | |
library: 'MapboxDirections', | |
libraryTarget: 'var', | |
path: path.resolve(__dirname, 'dist'), | |
filename: 'mapbox-gl-directions.js' | |
}, | |
entry: { | |
app: './src/index.js' | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.js$/, | |
exclude: /(node_modules|bower_components)/, | |
loader: "transform-loader/cacheable?brfs", | |
enforce: "post" | |
}, | |
{ | |
test: /\.js$/, | |
exclude: /(node_modules|bower_components)/, | |
use: { | |
loader: 'babel-loader', | |
options: { | |
presets: ['env'] | |
} | |
} | |
}, | |
{ | |
test: /\.json$/, | |
use: 'json-loader' | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment