lbry-desktop/webpack.renderer.additions.js
Igor Gassmann 232c1d8109
fix: re-enable flow type checking for the project (#1197)
Flow wasn't working anymore. This fixes flow type checking and it to the git precommit hook.
2018-04-25 17:20:59 -04:00

23 lines
721 B
JavaScript

const path = require('path');
const ELECTRON_RENDERER_PROCESS_ROOT = path.resolve(__dirname, 'src/renderer/');
module.exports = {
// This rule is temporarily necessary until https://github.com/electron-userland/electron-webpack/issues/60 is fixed.
module: {
rules: [
{
test: /\.jsx?$/,
loader: 'babel-loader',
options: {
presets: ['env', 'react', 'stage-2'],
},
},
],
},
// This allows imports to be made from the renderer process root (https://moduscreate.com/blog/es6-es2015-import-no-relative-path-webpack/).
resolve: {
modules: [ELECTRON_RENDERER_PROCESS_ROOT, 'node_modules', __dirname],
extensions: ['.js', '.jsx', '.scss'],
},
};