1
0
mirror of synced 2025-12-08 15:04:16 +08:00
Files
Mergely/webpack.config.js
Jamie Peabody bde295febd Build improvements (#73)
* removed editor and initial cleanup

* cleanup

* updated jquery

* tidy up

* moved src and build to lib

* tidy up and fixed webpack

* updated readme

* removed junk

* tidy up

* works with sample and editor

* removed editor_width and editor_height

* auto width and height

* added license feature

* not doing dist

* fixed typo

* added searchcursor

* fixed typo

* doc updates

* improved comment

* updated init for cm settings

* fixed jquery/cm includes

* documentation updates

* updated changes doc

* fixed cmsettings

* updated examples
2017-12-18 21:53:03 +00:00

39 lines
961 B
JavaScript

const webpack = require('webpack');
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: {
mergely: './src/mergely.js',
// 'mergely.min': './src/mergely.js'
},
output: {
path: path.join(__dirname, 'lib'),
filename: './[name].js',
library: 'mergely',
libraryTarget: 'umd',
umdNamedDefine: true
},
module: {
loaders: [
{ test: /\.css$/, loader: ExtractTextPlugin.extract('css-loader') }
]
},
resolve: {
extensions: ['.js']
},
externals: {
jquery: 'jQuery',
CodeMirror: 'CodeMirror'
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
include: /\.js$/,
// include: /\.min\.js$/,
exclude: /node_modules/
}),
new ExtractTextPlugin('mergely.css')
]
};