Skip to content
Prev Previous commit
Next Next commit
Remove inline raw-loder config
  • Loading branch information
tharakawj committed Oct 3, 2017
commit 0b48c898f52250d0027cde7db779f7e6b71f0e44
7 changes: 3 additions & 4 deletions packages/react-error-overlay/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ import { listenToRuntimeErrors } from './listenToRuntimeErrors';
import { iframeStyle } from './styles';
import { applyStyles } from './utils/dom/css';

/* eslint-disable import/no-webpack-loader-syntax */
//$FlowFixMe
import iframeScript from 'raw-loader!iframeScript';
/* eslint-enable import/no-webpack-loader-syntax */
// Importing iframe-bundle generated in the pre build step as
// a text using webpack raw-loader. See webpack.config.js file.
import iframeScript from 'iframeScript';

import type { ErrorRecord } from './listenToRuntimeErrors';

Expand Down
4 changes: 4 additions & 0 deletions packages/react-error-overlay/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ module.exports = {
},
module: {
rules: [
{
test: /iframe-bundle\.js$/,
use: 'raw-loader',
},
{
test: /\.js$/,
include: path.resolve(__dirname, './src'),
Expand Down