-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6373b69
commit 434abbc
Showing
2 changed files
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
const webpack = require('webpack') | ||
const path = require('path') | ||
const config = require('./webpack') | ||
const package = require('../package.json') | ||
|
||
module.exports = Object.assign(config, { | ||
devtool: 'source-map', | ||
entry: path.resolve(__dirname, '../src/main.js'), | ||
output: { | ||
path: path.resolve(__dirname, '../dist/'), | ||
filename: 'warp.js', | ||
library: 'Warp', | ||
libraryTarget: 'umd', | ||
}, | ||
plugins: [ | ||
new webpack.optimize.UglifyJsPlugin({ | ||
compress: { warnings: false }, | ||
output: { comments: false }, | ||
sourceMap: true, | ||
}), | ||
new webpack.BannerPlugin({ | ||
banner: `/*! Warp.js v${package.version} (${package.license}) */`, | ||
raw: true, | ||
entryOnly: true, | ||
}), | ||
], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,2 @@ | ||
import Warp from './Warp' | ||
|
||
if(typeof window !== 'undefined') | ||
{ | ||
window.Warp = Warp | ||
} | ||
|
||
export default Warp |