Last active
August 29, 2015 14:19
-
-
Save aclave1/388c78f7c0b32810a372 to your computer and use it in GitHub Desktop.
A reference webpack config.
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
var webpack = require('webpack'); | |
var path = require('path'); | |
module.exports = { | |
context: __dirname + '/assets/js', | |
//the file to build | |
entry: './main.js', | |
output: { | |
path: __dirname + '/assets/js', | |
filename: 'bundle.js' | |
}, | |
resolve: { | |
alias: { | |
//file path aliases | |
"angular": "vendor/angular/angular.min.js", | |
}, | |
root: ['assets/js','node_modules'], | |
extensions: ['', '.webpack.js', '.web.js', '.ts', '.js'], | |
modulesDirectories:['node_modules'] | |
}, | |
resolveLoader:{ | |
root: [path.join(__dirname,"node_modules")] | |
}, | |
plugins: [ | |
], | |
module: { | |
loaders: [ | |
{test: /\.html$/, loader: "html"}, | |
//{test:/\.ts$/,loader:'typescript-loader'} | |
], | |
noParse: [ | |
//path to files not to parse, good for prebuilt libs | |
] | |
} | |
}; |
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
//a simple grunt webpack config | |
module.exports = function (grunt) { | |
grunt.config.set('webpack', { | |
options: require('../../webpack.config'), | |
dev: { | |
progress: true | |
} | |
}); | |
grunt.loadNpmTasks('grunt-webpack'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment