Skip to content

Commit 9001436

Browse files
Garth Poitrasdevelopit
authored andcommitted
Upgrade to webpack 2 (preactjs#676)
1 parent abcdcda commit 9001436

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"sinon-chai": "^2.8.0",
105105
"typescript": "^2.2.2",
106106
"uglify-js": "^2.7.5",
107-
"webpack": "^1.13.1"
107+
"webpack": "^2.4.1"
108108
},
109109
"greenkeeper": {
110110
"ignore": [

test/karma.conf.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,32 +111,33 @@ module.exports = function(config) {
111111
devtool: 'inline-source-map',
112112
module: {
113113
/* Transpile source and test files */
114-
preLoaders: [
114+
rules: [
115115
{
116+
enforce: 'pre',
116117
test: /\.jsx?$/,
117118
exclude: /node_modules/,
118-
loader: 'babel',
119-
query: {
119+
loader: 'babel-loader',
120+
options: {
120121
loose: 'all',
121122
blacklist: ['es6.tailCall'],
122123
comments: false,
123124
compact: true
124125
}
125-
}
126-
],
127-
/* Only Instrument our source files for coverage */
128-
loaders: [].concat( coverage ? {
129-
test: /\.jsx?$/,
130-
loader: 'isparta',
131-
include: /src/
132-
} : [])
126+
},
127+
/* Only Instrument our source files for coverage */
128+
coverage ? {
129+
test: /\.jsx?$/,
130+
loader: 'isparta-loader',
131+
include: /src/
132+
} : {}
133+
]
133134
},
134135
resolve: {
135136
// The React DevTools integration requires preact as a module
136137
// rather than referencing source files inside the module
137138
// directly
138139
alias: { preact: '../src/preact' },
139-
modulesDirectories: [__dirname, 'node_modules']
140+
modules: [__dirname, 'node_modules']
140141
},
141142
plugins: [
142143
new webpack.DefinePlugin({

0 commit comments

Comments
 (0)