Skip to content

dtinth/karma-webpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

karma-webpack

// Karma configuration

module.exports = function(config) {
	config.set({
		// ... normal karma configuration

		// add webpack as preprocessor
		preprocessors: {
			'test/*Test.js': ['webpack']
		},

		webpack: {
			cache: true,
			// webpack configuration
		},

		webpackServer: {
			// webpack-dev-server configuration
			// webpack-dev-middleware configuration
		},

		// the port used by the webpack-dev-server
		// defaults to "config.port" + 1
		webpackPort: 1234,

		plugins: [
			require("karma-webpack")
		}

	});
};

Every test file is compiled with webpack and the resulting bundle is served.

Lisence

Copyright 2014 Tobias Koppers

MIT

About

Use webpack with karma.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%