Skip to content

Commit

Permalink
move build configs into a specific folder
Browse files Browse the repository at this point in the history
  • Loading branch information
folkvir committed May 26, 2018
1 parent 671bb16 commit c840f10
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
12 changes: 12 additions & 0 deletions configs/foglet-webpack-config-min.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
const lmerge = require('lodash.merge')
const webpackconfig = require('./foglet-webpack-config')
module.exports = lmerge(webpackconfig, {
mode: 'production',
output: {
'filename': 'foglet.bundle.min.js'
},
plugins: [new UglifyJSPlugin({
sourceMap: true
})]
})
28 changes: 28 additions & 0 deletions configs/foglet-webpack-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
mode: 'development',
entry: './foglet-core.js',
output: {
'path': require('path').resolve(process.cwd(), 'dist'),
'filename': 'foglet.bundle.js',
'library': 'foglet',
'libraryTarget': 'umd',
'umdNamedDefine': true
},
module: {
rules: [
{
test: /\.js$/,
exclude: () => {
return true
},
use: {
loader: 'babel-loader',
options: {
presets: [ 'env' ]
}
}
}
]
},
devtool: 'source-map'
}

0 comments on commit c840f10

Please sign in to comment.