Difference between revisions of "Tooling"
From Wiki2
Line 48: | Line 48: | ||
</markdown> | </markdown> | ||
===webpack=== | |||
*https://github.com/ruanyf/webpack-demos#demo14-exposing-global-variables-source |
Revision as of 16:17, 1 May 2016
tooling
<markdown>
- windows package.json quirks
"deploy": "NODE_ENV=production webpack -p --config webpack.production.config.js", "deploy": "set NODE_ENV=production&& webpack -p --config webpack.production.config.js",
- 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/components/Main.js", output: { filename: "public/bundle.js" }, module: { loaders: [ { test: /\\.jsx?$/, exclude: /(node_modules|bower_components)/, loader: 'babel' } ] } };
</markdown>