forked from emigre/openseadragon-annotations
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
34 lines (32 loc) · 949 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
'use strict';
var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'source-map',
resolve: {
extensions: ['', '.jsx', '.js'],
},
entry: path.join(__dirname, 'src/main.jsx'),
output: {
path: path.resolve(__dirname, 'dist/'),
publicPath: '/',
filename: 'openseadragon-annotations.js',
libraryTarget: 'var',
library: ['OpenSeadragon', 'Viewer', 'prototype', 'annotations'],
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.DedupePlugin(),
new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production') }),
new webpack.optimize.UglifyJsPlugin({ compressor: { warnings: false, screw_ie8: true } }),
],
externals: {
'OpenSeadragon': 'OpenSeadragon',
},
module: {
loaders: [
{ test: /\.jsx?$/, loader: 'babel', exclude: /node_modules/ },
{ test: /\.png$/, loader: 'url' },
],
},
};