Skip to content
This repository was archived by the owner on Dec 21, 2022. It is now read-only.

Commit bbebff9

Browse files
committed
Cleaning up this mess :)
1 parent a328267 commit bbebff9

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

webpack.config.js

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,10 @@
11
/* global __dirname, require, module*/
22

33
const webpack = require('webpack')
4-
// const UglifyJsPlugin = webpack.optimize.UglifyJsPlugin
54
const path = require('path')
6-
const env = require('yargs').argv.env // use --env with webpack 2
75
const entry = require('webpack-glob-entry')
86

9-
let libraryName = 'Library'
10-
11-
let plugins = [],
12-
outputFile,
13-
fullPath
14-
15-
if (env === 'build') {
16-
// plugins.push(new UglifyJsPlugin({ minimize: true }))
17-
outputFile = libraryName + '.min.js'
18-
} else {
19-
outputFile = libraryName + '.js'
20-
}
21-
22-
plugins.push(
23-
// Add module names to factory functions so they appear in browser profiler.
24-
new webpack.NamedModulesPlugin()
25-
)
26-
srcPath = __dirname + '/src'
7+
let srcPath = __dirname + '/src'
278

289
const config = {
2910
entry: entry(srcPath + '/core/*.js'),
@@ -70,7 +51,7 @@ const config = {
7051
externals: {
7152
'nw.gui': ''
7253
},
73-
plugins: plugins
54+
plugins: [new webpack.NamedModulesPlugin()]
7455
}
7556

7657
module.exports = config

0 commit comments

Comments
 (0)