Difference between revisions of "Tooling"

From Wiki2
Line 27: Line 27:


module.exports = {
module.exports = {
entry: "./app/compnents/Main.js",
entry: "./app/components/Main.js",
output: {
output: {
filename: "public/bundle.js"
filename: "public/bundle.js"

Revision as of 09:31, 14 August 2015

tooling

<markdown>

      1. react-babel
   npm init
   npm install --save react
   npm install --save-dev babel-loader
   mkdir public
   cd public
   touch index.html
      1. public/index.html

<!DOCTYPE html>

      1. webpack.config.js

module.exports = { entry: "./app/components/Main.js", output: { filename: "public/bundle.js" }, module: { loaders: [ { test: /\\.jsx?$/, exclude: /(node_modules|bower_components)/, loader: 'babel' } ] } };

</markdown>