mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-05 05:15:22 +00:00
Add a dev build configuration
Add caching and a faster source map for the dev builds. This brings the rebuild time down to about 500ms for me. dev build now puts the bundle in the electron app/js directory so that the app can be automatically reloaded
This commit is contained in:
parent
724742f0db
commit
33395ccb33
2 changed files with 43 additions and 2 deletions
|
@ -25,8 +25,8 @@ module.exports = {
|
||||||
loaders: [
|
loaders: [
|
||||||
{ test: /\.css$/, loader: "style!css" },
|
{ test: /\.css$/, loader: "style!css" },
|
||||||
{
|
{
|
||||||
test: /\.jsx?$/,
|
test: /\.jsx?$/,
|
||||||
loader: 'babel',
|
loader: 'babel',
|
||||||
query: {
|
query: {
|
||||||
cacheDirectory: true,
|
cacheDirectory: true,
|
||||||
presets:[ 'es2015', 'react', 'stage-2' ]
|
presets:[ 'es2015', 'react', 'stage-2' ]
|
||||||
|
|
41
webpack.dev.config.js
Normal file
41
webpack.dev.config.js
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
const PATHS = {
|
||||||
|
app: path.join(__dirname, 'app'),
|
||||||
|
dist: path.join(__dirname, '..', 'app', 'dist')
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
entry: ['babel-polyfill', './js/main.js'],
|
||||||
|
output: {
|
||||||
|
path: path.join(PATHS.dist, 'js'),
|
||||||
|
publicPath: '/js/',
|
||||||
|
filename: "bundle.js",
|
||||||
|
pathinfo: true
|
||||||
|
},
|
||||||
|
debug: true,
|
||||||
|
cache: true,
|
||||||
|
devtool: 'eval',
|
||||||
|
module: {
|
||||||
|
preLoaders: [
|
||||||
|
{
|
||||||
|
test: /\.jsx?$/,
|
||||||
|
loaders: ['eslint'],
|
||||||
|
// define an include so we check just the files we need
|
||||||
|
include: PATHS.app
|
||||||
|
}
|
||||||
|
],
|
||||||
|
loaders: [
|
||||||
|
{ test: /\.css$/, loader: "style!css" },
|
||||||
|
{
|
||||||
|
test: /\.jsx?$/,
|
||||||
|
loader: 'babel',
|
||||||
|
query: {
|
||||||
|
cacheDirectory: true,
|
||||||
|
presets:[ 'es2015', 'react', 'stage-2' ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
target: 'electron-main',
|
||||||
|
};
|
Loading…
Add table
Reference in a new issue