forked from fergiemcdowall/stopword
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
42 lines (39 loc) · 1.01 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
const path = require('path')
const pkg = require('./package.json')
const glob = require('glob')
module.exports = [
// Generating browser version of stopword
{
mode: 'production',
entry: './lib/stopword.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'stopword.' + pkg.version + '.js',
library: 'sw'
},
devtool: 'none' // prevent webpack from using eval() on my module
},
// Generating a latest browser version of stopword (same as latest version number)
{
mode: 'production',
entry: './lib/stopword.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'stopword.latest.js',
library: 'sw'
},
devtool: 'none' // prevent webpack from using eval() on my module
},
// Generating test script for the browser
{
mode: 'production',
entry: glob.sync('./test/test.js'),
output: {
path: path.resolve(__dirname, './test/sandbox'),
filename: 'bundle.js'
},
node: {
fs: 'empty'
}
}
]