forked from sjoerdapp/styleguide2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.standalone.config.js
More file actions
53 lines (50 loc) · 1.2 KB
/
Copy pathwebpack.standalone.config.js
File metadata and controls
53 lines (50 loc) · 1.2 KB
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
47
48
49
50
51
52
53
'use strict'; // eslint-disable-line strict
const path = require('path');
const webpack = require('webpack');
const pkg = require('./package.json');
const poststylus = require('poststylus');
const DEBUG = process.env.NODE_ENV !== 'production';
module.exports = {
entry: [
'./src/index'
],
output: {
path: path.join(__dirname, 'build'),
filename: pkg.name + '-' + pkg.version + '.standalone.min.js',
publicPath: '',
library: 'Auth0Components',
libraryTarget: 'umd'
},
module: {
loaders: [{
test: /\.js$/,
loader: 'babel',
include: path.join(__dirname, 'src')
},
{
test: /\.styl$/,
loader: 'style-loader!' +
`css-loader?${JSON.stringify({
sourceMap: DEBUG,
modules: true,
localIdentName: DEBUG ? '[name]_[local]_[hash:base64:3]' : '[hash:base64:4]',
minimize: !DEBUG,
importLoaders: true
})}` +
'!stylus-loader'
}]
},
plugins: [
new webpack.NoErrorsPlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
],
stylus: {
use: [
poststylus(['autoprefixer'])
]
}
};