forked from phobal/ivideo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial non-workign commit * Initial working version * Cleaned up config and comments * Dynamically required DLL * Added 'dll not built' warning to webpack dev config * Added support for babel caching * Removed '.babelrc.js', dynamically create babel config * Reverted modules: false
- Loading branch information
Showing
10 changed files
with
165 additions
and
30 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
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ flow-typed/ | |
app/dist/ | ||
app/main.js | ||
node_modules | ||
dll |
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 |
---|---|---|
|
@@ -40,6 +40,7 @@ app/bundle.js.map | |
app/style.css | ||
app/style.css.map | ||
dist | ||
dll | ||
main.js | ||
main.js.map | ||
|
||
|
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import webpack from 'webpack'; | ||
import path from 'path'; | ||
import merge from 'webpack-merge'; | ||
import baseConfig from './webpack.config.base'; | ||
import { dependencies } from './package.json'; | ||
|
||
const dist = path.resolve(process.cwd(), 'dll'); | ||
|
||
export default merge(baseConfig, { | ||
context: process.cwd(), | ||
|
||
devtool: 'eval', | ||
|
||
target: 'electron-renderer', | ||
|
||
resolve: { | ||
modules: [ | ||
'app', | ||
'node_modules', | ||
], | ||
}, | ||
|
||
entry: { | ||
vendor: [ | ||
'babel-polyfill', | ||
...Object.keys(dependencies) | ||
] | ||
.filter(dependency => dependency !== 'font-awesome'), | ||
}, | ||
|
||
output: { | ||
library: 'vendor', | ||
path: dist, | ||
filename: '[name].dll.js', | ||
libraryTarget: 'var' | ||
}, | ||
|
||
plugins: [ | ||
new webpack.DllPlugin({ | ||
path: path.join(dist, '[name].json'), | ||
name: '[name]', | ||
}), | ||
|
||
/** | ||
* Create global constants which can be configured at compile time. | ||
* | ||
* Useful for allowing different behaviour between development builds and | ||
* release builds | ||
* | ||
* NODE_ENV should be production so that modules do not perform certain | ||
* development checks | ||
*/ | ||
new webpack.DefinePlugin({ | ||
'process.env.NODE_ENV': JSON.stringify('development'), | ||
}), | ||
|
||
new webpack.LoaderOptionsPlugin({ | ||
debug: true, | ||
options: { | ||
context: path.resolve(process.cwd(), 'app'), | ||
output: { | ||
path: path.resolve(process.cwd(), 'dll'), | ||
}, | ||
}, | ||
}) | ||
], | ||
externals: ['fsevents', 'crypto-browserify'] | ||
}); |
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