Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (33 sloc) 821 Bytes
let path = require('path')
let min = process.argv.indexOf('-p') !== -1
let output_library = "RasterToGcode"
let output_filename = "lw.raster-to-gcode"+ (min ? ".min" : "") + ".js"
let src_path = path.resolve('./src')
let dist_path = path.resolve('./dist')
module.exports = {
debug: true,
context: src_path,
devtool: "source-map",
entry: [
"./raster-to-gcode.js"
],
output: {
path: dist_path,
filename: output_filename,
library: output_library,
libraryTarget: "umd",
umdNamedDefine: true
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loaders: ["babel-loader"]
}
]
},
devServer: {
contentBase: dist_path
}
};