Difference between revisions of "Tooling"
From Wiki2
Line 11: | Line 11: | ||
touch index.html | touch index.html | ||
### | ### public/index.html | ||
<!DOCTYPE html> | <!DOCTYPE html> | ||
Line 23: | Line 23: | ||
</body> | </body> | ||
</html> | </html> | ||
### webpack.config.js | |||
module.exports = { | |||
entry: "./app/compnents/Main.js", | |||
output: { | |||
filename: "public/bundle.js" | |||
}, | |||
module: { | |||
loaders: [ | |||
{ | |||
test: /\\.jsx?$/, | |||
exclude: /(node_modules|bower_components)/, | |||
loader: 'babel' | |||
} | |||
] | |||
} | |||
}; | |||
</markdown> | </markdown> |
Revision as of 13:17, 13 August 2015
tooling
<markdown>
- react-babel
npm init npm install --save react npm install --save-dev babel-loader mkdir public cd public touch index.html
- public/index.html
<!DOCTYPE html>
- webpack.config.js
module.exports = { entry: "./app/compnents/Main.js", output: { filename: "public/bundle.js" }, module: { loaders: [ { test: /\\.jsx?$/, exclude: /(node_modules|bower_components)/, loader: 'babel' } ] } };
</markdown>