Skip to content

History

Revisions

  • Document a prefix ! in require loaders

    @denis-sokolov denis-sokolov committed Feb 26, 2016
    6d94c8f
  • Missing word

    @KenStipek KenStipek committed Feb 25, 2016
    7b579b6
  • Fix rewrite regular expression

    @finwe finwe committed Feb 25, 2016
    14b0072
  • "Dubugging Support" Style Weight was inconsistent.

    @chrisgervang chrisgervang committed Feb 24, 2016
    e12880a
  • +markdownattrs template loader

    Vasily Pikulev committed Feb 23, 2016
    0382fb3
  • Fixed typos

    @mariangibala mariangibala committed Feb 23, 2016
    b562e41
  • req doesn't have a #replace member :-)

    Dan committed Feb 23, 2016
    09acaa0
  • Updated examples (markdown)

    @vinsproduction vinsproduction committed Feb 21, 2016
    4c152ff
  • Updated examples (markdown)

    @vinsproduction vinsproduction committed Feb 21, 2016
    a064342
  • Changed username and title

    @booleanhunter booleanhunter committed Feb 20, 2016
    d1e1685
  • Fix route in section about rewrite.

    @Narigo Narigo committed Feb 19, 2016
    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

    @Narigo Narigo committed Feb 19, 2016
    4c61ea3
  • Fixing grammar and typos. Making certain passages more readable. Didn't really change the content at all...

    @skipjack skipjack committed Feb 18, 2016
    6418422
  • Typos and grammatical errors.

    @SH4DY 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)

    @sohkai sohkai committed Feb 18, 2016
    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 fzero committed Feb 17, 2016
    46938dc
  • Updated configuration (markdown)

    @nnur 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.

    Dylan Harness committed Feb 14, 2016
    8d4dee8
  • Updated list of plugins (markdown)

    @goldensunliu goldensunliu committed Feb 12, 2016
    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)

    @odykyi odykyi committed Feb 12, 2016
    1027430
  • Added a webpack tutorial which explains about React Hot Loader

    @booleanhunter booleanhunter committed Feb 11, 2016
    e63b38c
  • Updated list of tutorials (markdown)

    @booleanhunter booleanhunter committed Feb 11, 2016
    03ac136
  • fix typo

    @jhou2 jhou2 committed Feb 10, 2016
    046bfcd
  • Brief intro to plugins

    @jhou2 jhou2 committed Feb 10, 2016
    4b41503
  • Updated node.js api (markdown)

    @aldendaniels aldendaniels committed Feb 10, 2016
    4814d82
  • Remove wrong entry under "Styling"

    @jhnns jhnns committed Feb 9, 2016
    d6d555a
  • Added ejs-html-loader.

    @mcmath mcmath committed Feb 8, 2016
    1cdb509
  • Updated changelog (markdown)

    @sokra sokra committed Feb 8, 2016
    32ea431
  • Updated code splitting (markdown)

    @digitaljogger digitaljogger committed Feb 6, 2016
    472fe7b
  • Fixed invalid js example in 'module.loaders'

    @hawkrives hawkrives committed Feb 5, 2016
    3ac6672