You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Update karma config for webpack 4
This commit is contained in:
@@ -23,6 +23,9 @@ var fs = require('fs');
|
|||||||
//
|
//
|
||||||
var testFile = process.env.KARMA_TEST_FILE || 'test/all-tests.js';
|
var testFile = process.env.KARMA_TEST_FILE || 'test/all-tests.js';
|
||||||
|
|
||||||
|
// make sure we're flagged as development to avoid wasting time optimising
|
||||||
|
webpack_config.mode = 'development';
|
||||||
|
|
||||||
process.env.PHANTOMJS_BIN = 'node_modules/.bin/phantomjs';
|
process.env.PHANTOMJS_BIN = 'node_modules/.bin/phantomjs';
|
||||||
|
|
||||||
function fileExists(name) {
|
function fileExists(name) {
|
||||||
@@ -160,10 +163,9 @@ module.exports = function (config) {
|
|||||||
|
|
||||||
webpack: {
|
webpack: {
|
||||||
module: {
|
module: {
|
||||||
loaders: [
|
rules: [
|
||||||
{ test: /\.json$/, loader: "json" },
|
|
||||||
{
|
{
|
||||||
test: /\.js$/, loader: "babel",
|
test: /\.js$/, loader: "babel-loader",
|
||||||
include: [path.resolve('./src'),
|
include: [path.resolve('./src'),
|
||||||
path.resolve('./test'),
|
path.resolve('./test'),
|
||||||
]
|
]
|
||||||
@@ -203,6 +205,7 @@ module.exports = function (config) {
|
|||||||
root: [
|
root: [
|
||||||
path.resolve('./test'),
|
path.resolve('./test'),
|
||||||
],
|
],
|
||||||
|
modules: "node_modules",
|
||||||
},
|
},
|
||||||
devtool: 'inline-source-map',
|
devtool: 'inline-source-map',
|
||||||
externals: {
|
externals: {
|
||||||
|
|||||||
Reference in New Issue
Block a user