score:6
Accepted answer
module.exports = {
entry: path.resolve(__dirname, "js/helloworld.jsx"),
output: {
path: path.resolve(__dirname, "out"),
publicPath: 'out/',
filename: 'app.js'
},
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'babel',
exclude: /node_modules/
}
]
}
};
Source: stackoverflow.com
Related Articles
- How to configure webpack in storybook to allow babel to import react components outside of project folder
- Webpack / Babel / React build error: "Unknown option: foo/node_modules/react/react.js.Children"
- How to set up Babel 6 stage 0 with React and Webpack
- How to configure webpack dev server with react router dom v4?
- How to import the electron ipcRenderer in a react / webpack 2 setup
- { React jsx babel es6 webpack } How Can I Comment in render ( return ( // || /**/ ) )?
- SCRIPT1002: Syntax error in IE11 with React + Babel + Webpack
- Cannot find module 'electron' in Electron + React + Webpack setup
- Add Favicon with React and Webpack
- Dynamically Add Images React Webpack
- How to import CSS modules with Typescript, React and Webpack
- How to avoid React loading twice with Webpack when developing
- Webpack + React + TypeScript: Module not found ... in ... node_modules/react/
- Writing embeddable Javascript plugin with React & Webpack
- How do you configure babel to run with different configurations in different environments
- Disable React.createClass and PropTypes deprecated warnings in babel react present
- React without Webpack
- Why is React Webpack production build showing Blank page?
- Bundle error using webpack for Electron application `Cannot resolve module 'electron'`
- how to setup bootstrap 4 scss with react webpack
- Syntax error in IE11 with Webpack, Babel and React
- How to update webpack config for a react project created using create-react-app?
- Use CSS Modules in React components with Typescript built by webpack
- Build React components library with Webpack 4
- Remove unused css with React and Webpack
- Webpack 4 and react loadable does not seems to create correct chunk for server side rendering
- Using React Router with CDN and without webpack or browserify
- Setting up Airbnb ESLint with React and Webpack
- React + Webpack HMR is refreshing the page (not hot loading)
- Why does production build of React app (with Webpack and Babel) use wrong development env with HMR, which causes errors?
- Typescript generic class equivalent for React.memo
- How upload reactjs project to ftp?
- Simple selector and nested selector in JSS
- React routes param auto decode string
- Why and when do we need to bind functions and eventHandlers in React?
- Laravel 5.4 can't run "php artisan preset react" comand
- Passing data child to parent functional components in reactjs
- adding a custom service worker to create-react-app
- How to get Material UI Icon SVG path? React Icon Picker
- Preventing redux store value from being used again in the component
- React - Add @babel/preset-react (https://git.io/JfeDR) to the 'presets' section of your Babel config to enable transformation
- Dependency is not renamed
- Script load in react
- How can I pass multiple props in a single event handler in ReactJS?
- Jest testing hook state update with setTimeout
- Merging Images Using Javascript/React
- How to re-render a parent from a children component with hook?
- Counting characters from TextArea in ReactJs
- Module build failed: Error: dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
- Redux saga dispatching actions from inside map inside saga-action