-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
46 lines (43 loc) · 1.15 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
var webpack = require('webpack');
var path = require('path');
// var BUILD_DIR = path.resolve(__dirname, './compiled');
// var APP_DIR = path.resolve(__dirname, './');
var config = {
devtool: 'inline-source-map',
context: path.join(__dirname),
entry: './src/index.js',
output: {
path: path.join(__dirname, 'dist'),
filename: 'react-web-terminal.js',
libraryTarget: 'umd',
library: 'WebTerminal'
},
externals: {
'react': 'var React',
'react/addons': 'var React'
},
resolve: {
modulesDirectories: ['node_modules', 'src'],
extentions: ['','.js','.jsx','.css','.scss']
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loaders: ['babel?presets[]=react,presets[]=es2015']
},
{
test: /\.scss$/,
// Query parameters are passed to node-sass
loader: 'style!css!sass?outputStyle=expanded&' +
'includePaths[]=' + (path.resolve(__dirname, './bower_components')) + '&' +
'includePaths[]=' + (path.resolve(__dirname, './node_modules'))
}
]
},
plugins: [
new webpack.NoErrorsPlugin()
]
};
module.exports = config;