Removing react-native support and updating devtool to eval-source-map for dev

This commit is contained in:
Adolfo Panizo 2018-03-07 10:14:04 +01:00
parent 2597b4bb2a
commit d8891f2c1e
4 changed files with 10 additions and 49 deletions

View File

@ -35,7 +35,7 @@ const postcssPlugins = [
];
module.exports = {
devtool: 'cheap-module-source-map',
devtool: 'eval-source-map',
mode: 'development',
entry: [
"babel-polyfill",
@ -64,11 +64,6 @@ module.exports = {
// some tools, although we do not recommend using it, see:
// https://github.com/facebookincubator/create-react-app/issues/290
extensions: ['.js', '.json', '.jsx'],
alias: {
// Support React Native Web
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
'react-native': 'react-native-web'
}
},
output: {
// Next line is not used in dev but WebpackDevServer crashes without it:
@ -117,7 +112,7 @@ module.exports = {
use: [
{
loader: "html-loader",
options: { minimize: true }
options: { minimize: false }
}
]
}
@ -129,5 +124,12 @@ module.exports = {
}),
new webpack.DefinePlugin(env),
new webpack.HotModuleReplacementPlugin(),
]
],
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
node: {
fs: 'empty',
net: 'empty',
tls: 'empty'
}
};

View File

@ -106,11 +106,6 @@ module.exports = {
// some tools, although we do not recommend using it, see:
// https://github.com/facebookincubator/create-react-app/issues/290
extensions: ['.js', '.json', '.jsx'],
alias: {
// Support React Native Web
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
'react-native': 'react-native-web'
}
},
module: {

View File

@ -1,23 +0,0 @@
pragma solidity ^0.4.2;
contract Migrations {
address public owner;
uint public last_completed_migration;
modifier restricted() {
if (msg.sender == owner) _;
}
function Migrations() public {
owner = msg.sender;
}
function setCompleted(uint completed) public restricted {
last_completed_migration = completed;
}
function upgrade(address new_address) public restricted {
Migrations upgraded = Migrations(new_address);
upgraded.setCompleted(last_completed_migration);
}
}

View File

@ -1,13 +0,0 @@
pragma solidity ^0.4.18;
contract SimpleStorage {
uint storedData;
function set(uint x) public {
storedData = x;
}
function get() public view returns (uint) {
return storedData;
}
}