Document a prefix ! in require loaders
6d94c8f
Fix rewrite regular expression
finwe
committed
Feb 25, 2016
14b0072
"Dubugging Support" Style Weight was inconsistent.
e12880a
+markdownattrs template loader
0382fb3
req doesn't have a #replace member :-)
Dan
committed
Feb 23, 2016
09acaa0
Updated examples (markdown)
4c152ff
Updated examples (markdown)
a064342
Changed username and title
d1e1685
Fix route in section about rewrite.
833eda3
Added a section about the rewrite callback to rewrite proxy requests. Not sure when this was added, but someone told me this: http://stackoverflow.com/a/35491378/1627744
4c61ea3
Fixing grammar and typos. Making certain passages more readable. Didn't really change the content at all...
6418422
Typos and grammatical errors.
SH4DY
committed
Feb 18, 2016
20413fc
Update webpack-dev-server docs for proper app entry point when using HMR (see https://github.com/webpack/webpack-dev-server/issues/326)
f09f6a1
Added a link to a good setup guide that was linked deep in the tutorials section. It was either this or using GNU Make. You guys really have to get your documentation shit together.
fzero
committed
Feb 17, 2016
46938dc
Updated configuration (markdown)
nnur
committed
Feb 14, 2016
2aa0081
changed "performance need to be better" to "performance needs to be better" - adding an 's' for the sake of grammar.
8d4dee8
Updated list of plugins (markdown)
272b2c2
# karma-webpack ## Installation ``` sh npm install --save-dev karma-webpack ``` ## Usage ``` javascript // Karma configuration module.exports = function(config) { config.set({ // ... normal karma configuration files: [ // all files ending in "_test" 'test/*_test.js', 'test/**/*_test.js' // each file acts as entry point for the webpack configuration ], preprocessors: { // add webpack as preprocessor 'test/*_test.js': ['webpack'], 'test/**/*_test.js': ['webpack'] }, webpack: { // karma watches the test entry points // (you don't need to specify the entry option) // webpack watches dependencies // webpack configuration }, webpackMiddleware: { // webpack-dev-middleware configuration // i. e. noInfo: true }, plugins: [ require("karma-webpack") ] }); }; ``` ## Alternative usage This configuration is more performant, but you cannot run single test anymore (only the complete suite). The above configuration generates a webpack bundle for each test. For many testcases this can result in many big files. The alterative configuration creates a single bundle with all testcases. ``` javascript files: [ // only specify one entry point // and require all tests in there 'test/test_index.js' ], preprocessors: { // add webpack as preprocessor 'test/test_index.js': ['webpack'] }, ``` ``` javascript // test/test_index.js // require all modules ending in "_test" from the // current directory and all subdirectories var testsContext = require.context(".", true, /_test$/); testsContext.keys().forEach(testsContext); ``` Every test file is required using the [require.context](http://webpack.github.io/docs/context.html#require-context) and compiled with webpack into one test bundle. ## Source Maps You can use the `karma-sourcemap-loader` to get the source maps generated for your test bundle. ``` npm install --save-dev karma-sourcemap-loader ``` And then add it to your preprocessors ``` javascript preprocessors: { 'test/test_index.js': ['webpack', 'sourcemap'] } ``` And tell webpack to generate sourcemaps ``` javascript webpack: { // ... devtool: 'inline-source-map' } ``` ## Options This is the full list of options you can specify in your Karma config. ### webpack Webpack configuration. ### webpackMiddleware Configuration for webpack-dev-middleware. ## License Copyright 2014-2015 Tobias Koppers [MIT](http://www.opensource.org/licenses/mit-license.php)
1027430
Added a webpack tutorial which explains about React Hot Loader
e63b38c
Updated list of tutorials (markdown)
03ac136
Updated node.js api (markdown)
4814d82
Remove wrong entry under "Styling"
jhnns
committed
Feb 9, 2016
d6d555a
Updated changelog (markdown)
sokra
committed
Feb 8, 2016
32ea431
Updated code splitting (markdown)
472fe7b
Fixed invalid js example in 'module.loaders'
3ac6672