My React Chrome extension does not appear on my React web app, even though I've got it reading all the components, rendering it all correctly. Everything is coming out as an iframe (screenshot attached).
Here is my webpack.config.js file.
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: './main.js',
output: {path: __dirname, filename: 'bundle.js'},
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'react']
}
},
{
test: /\.css$/,
loader: 'style!css'
},
{
test: require.resolve('react'),
loader: 'expose?React'
}
]
},
plugins: [
new webpack.NoErrorsPlugin()
],
watch: true
};
My version of React, I believe 0.14.7, react-dom is 0.14.0. I also tried manipulating the main.js file which is the entry point.
I have
if (typeof window !== 'undefined') {
window.React = React;
}
Could use any suggestions or help.