Last active
November 5, 2015 05:05
-
-
Save mikezhuyuan/43149349760806020a02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm install webpack react reactdom babel-preset-react babel-core babel-loader | |
module.exports = { | |
entry: './app.jsx', | |
output: { | |
path: './dist', | |
filename: 'bundle.js' | |
}, | |
module: { | |
loaders: [{ | |
test: /\.jsx$/, | |
exclude: /(node_modules|bower_components)/, | |
loader: 'babel', | |
query: { | |
cacheDirectory: true, | |
presets: ['react'] | |
} | |
}] | |
}, | |
externals: { | |
'react': 'React', | |
'react-dom': 'ReactDOM' | |
}, | |
resolve: { | |
extensions: ['', '.js', '.jsx'] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment