Use new webpack api schema
This commit is contained in:
@@ -16,14 +16,14 @@ const sourceMapQueryStr = (config.enabled.sourceMaps) ? '+sourceMap' : '-sourceM
|
|||||||
const jsLoader = {
|
const jsLoader = {
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
exclude: [/(node_modules|bower_components)(?)/],
|
exclude: [/(node_modules|bower_components)(?)/],
|
||||||
loaders: [{
|
use: [{
|
||||||
loader: 'buble',
|
loader: 'buble',
|
||||||
query: { objectAssign: 'Object.assign' },
|
options: { objectAssign: 'Object.assign' },
|
||||||
}],
|
}],
|
||||||
};
|
};
|
||||||
|
|
||||||
if (config.enabled.watcher) {
|
if (config.enabled.watcher) {
|
||||||
jsLoader.loaders.unshift('monkey-hot?sourceType=module');
|
jsLoader.use.unshift('monkey-hot?sourceType=module');
|
||||||
}
|
}
|
||||||
|
|
||||||
let webpackConfig = {
|
let webpackConfig = {
|
||||||
@@ -71,7 +71,7 @@ let webpackConfig = {
|
|||||||
{
|
{
|
||||||
test: /\.(png|jpe?g|gif|svg|ico)$/,
|
test: /\.(png|jpe?g|gif|svg|ico)$/,
|
||||||
include: config.paths.assets,
|
include: config.paths.assets,
|
||||||
loaders: [
|
use: [
|
||||||
`file?${qs.stringify({
|
`file?${qs.stringify({
|
||||||
name: `[path]${assetsFilenames}.[ext]`,
|
name: `[path]${assetsFilenames}.[ext]`,
|
||||||
})}`,
|
})}`,
|
||||||
@@ -97,7 +97,7 @@ let webpackConfig = {
|
|||||||
test: /\.(ttf|eot|woff2?|png|jpe?g|gif|svg)$/,
|
test: /\.(ttf|eot|woff2?|png|jpe?g|gif|svg)$/,
|
||||||
include: /node_modules|bower_components/,
|
include: /node_modules|bower_components/,
|
||||||
loader: 'file',
|
loader: 'file',
|
||||||
query: {
|
options: {
|
||||||
name: `vendor/${config.cacheBusting}.[ext]`,
|
name: `vendor/${config.cacheBusting}.[ext]`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user