Created
January 12, 2016 19:47
-
-
Save joshcrews/340b9d65c3fd378ae7a0 to your computer and use it in GitHub Desktop.
webpack.config.js
This file contains hidden or 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
module.exports = { | |
devtool: "source-map", | |
entry: { | |
"app": ["./javascripts/react-reader/index.js"], | |
}, | |
output: { | |
path: "./javascripts", | |
filename: "reactreader.js" | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.js$/, | |
exclude: /node_modules/, | |
loader: "babel", | |
query: { | |
presets: ['es2015', 'react'] | |
} | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this sits in app/assets of a rails app, with a package.json and node_modules folder in the same place. all my react app files are in app/assets/javascripts/react-reader. they output that file reactreader.js, which I manually
webpack -p
to deploy right now.