Skip to content

Instantly share code, notes, and snippets.

@helmi03
Created June 16, 2017 02:48
Show Gist options
  • Save helmi03/8dd3201c2d36315ca24477dde5329ed3 to your computer and use it in GitHub Desktop.
Save helmi03/8dd3201c2d36315ca24477dde5329ed3 to your computer and use it in GitHub Desktop.
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