Last active
August 29, 2015 14:08
-
-
Save brentropy/2a2f72579cc0b2906ada to your computer and use it in GitHub Desktop.
Revisions
-
brentropy revised this gist
Nov 6, 2014 . 1 changed file with 3 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,6 @@ var DefinePlugin = require('webpack').DefinePlugin var HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { entry: './main.js', output: { @@ -20,7 +16,9 @@ module.exports = { ] }, plugins: [ new DefinePlugin({ ENV: JSON.stringify(process.env.BUILD_ENV || 'development') }), new HtmlWebpackPlugin({ title: 'Page Title for HTML' }) -
brentropy created this gist
Nov 6, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ { "name": "webpack-build-example", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "start": "webpack-dev-server -d", "build": "webpack -p", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Brent Burgoyne", "license": "MIT", "devDependencies": { "css-loader": "^0.9.0", "file-loader": "^0.8.1", "html-webpack-plugin": "^1.1.0", "jsx-loader": "^0.12.0", "less": "^1.7.5", "less-loader": "^0.7.7", "style-loader": "^0.8.1", "url-loader": "^0.5.5", "webpack": "^1.4.10", "webpack-dev-server": "^1.6.5" } } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ var DefinePlugin = require('webpack').DefinePlugin var HtmlWebpackPlugin = require('html-webpack-plugin') var envPlugin = new DefinePlugin({ ENV: JSON.stringify(process.env.BUILD_ENV || 'development') }) module.exports = { entry: './main.js', output: { path: './build', filename: 'main.[hash].js', chunkFilename: 'chunk.[hash].[id].js' }, module: { loaders: [ {test: /\.js$/, loader: 'jsx-loader?harmony'}, {test: /\.less$/, loader:'style-loader!css-loader!less-loader'}, {test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192'} ] }, plugins: [ envPlugin, new HtmlWebpackPlugin({ title: 'Page Title for HTML' }) ], resolve: { extensions: ['', '.js', '.json'] } }