Skip to content

KidkArolis/karma-webpack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 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.

License

Copyright 2014 Tobias Koppers

MIT

About

Use webpack with karma.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published