reactjs


electron not allowed to load local resource


I am looking to use React application using MobX framework, into Electron.
I have success loading MobX with React, but when I try to wrap it with Electron, I have a console error message not allowed to load local resource
My package JSON :
{
"name": "electron-stuff",
"version": "1.0.0",
"description": "",
"main": "src/electron.js",
"scripts": {
"babel": "babel",
"webpack": "webpack",
"start": "electron . --allow-file-access-from-files"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"mobx": "^2.3.7",
"mobx-react": "^3.5.1",
"react": "^15.2.1",
"react-dom": "^15.3.0"
},
"devDependencies": {
"babel-core": "^6.17.0",
"babel-loader": "^6.2.4",
"babel-plugin-transform-class-properties": "^6.10.2",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-es2015": "^6.9.0",
"babel-preset-react": "^6.11.1",
"css-loader": "^0.23.1",
"react-addons-test-utils": "^15.3.0",
"style-loader": "^0.13.1",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1"
}
}
My webpack.config.js
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
var path = require('path');
module.exports = {
context: path.join(__dirname, "src"),
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/main.js",
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
},
{ test: /\.css$/, loader: "style-loader!css-loader" },
]
},
output: {
path: path.join(__dirname, "src"),
filename: "main.min.js"
},
plugins: debug ? [] : [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({ mangle: false, sourcemap: false }),
],
};
Why does the electron saying that there he not allow to load local resource ? electron does not suppose to have access to local files? how can I solve this ?
Seems Like I accidentally route to the wrong path.
problem solved.

Related Links

React - adding class to children components
How to display time ago when specific table columns updated?
How to use react-datetime with react + typescript (inside tsx)
Unit testing using Jest for React/Redux Component
React Uncaught ReferenceError: variable is not defined
Redux: Add/remove from nested object/array, without mutating?
Jest snapshot different when testing through CI vs locally
React route <Link To> is not working in maven springboot project
React multiple output files of bundle of single Input file
How import statement works in ES6 for React Components [duplicate]
How to decouple a Component from it's own data fetching needs
background: url(…) inside of SCSS with webpack not showing up
Foundation Reveal Modal not closing with React 15.3.2
How to add additional field names in to selected label in React Select?
Why receiving error 'should be push route with duplicated key' with Regact Native's NavigationExperimental?
React router dynamic navigation panel

Categories

HOME
logging
algolia
kendo-ui-angular2
kendo-ui
network-programming
fortran
process
ldap
webvr
bigtable
lithium
powerquery
zabbix
ephesoft
theory
openbsd
jpql
velocity
dynamics-crm-2011
fastreport
yui
openstack-horizon
virtuemart
novacode-docx
audio-streaming
cherrypy
lotusscript
smali
ng-tags-input
orgchart
angular2-changedetection
windows-10-mobile
meteor-accounts
csproj
osgi-bundle
schedule
akamai
urhosharp
restler
powerbi-embedded
framebuffer
nsdateformatter
google-chrome-console
autodesk-data-management
text-extraction
spring-data-commons
text-formatting
stanford-nlp-server
multivalue
visualizer
jcifs
sharpdevelop
openpgp.js
sp
overhead
scrollmagic
suitesparse
strtol
ldd
foreground
require-handlebars
mate-desktop
hoare-logic
weblogic-maven-plugin
hotkeys
3d-rendering
user-profile
razorengine
android-progressbar
wizard
methodology
dday
skscene
commercetools
gulp-cdnizer
biginsights
log4cxx
nmock
google-experiments
teamstudio-unplugged
static-files
nsq
novell
html5-filesystem
nomachine
vbaccelerator
facebook-likebox
ekevent
misfire-instruction
octokit
cab
http-compression
system.transactions
cron4j
wpml
nserror
datasheet
stl-algorithm
utm
visual-leak-detector
log-shipping
xpolog
n2
lwp
table-valued-parameters
large-data-volumes
hp-trim
morfik
coderush-xpress
stackless
urlscan

Resources

Encrypt Message