未验证 提交 8cf6ef58 编写于 作者: T Tim Neutkens 提交者: GitHub

Remove unused dev option from babel-loader (#6624)

上级 6ba41915
......@@ -18,7 +18,7 @@ export default function getBaseWebpackConfig (dir: string, {dev = false, isServe
const defaultLoaders = {
babel: {
loader: 'next-babel-loader',
options: { dev, isServer, cwd: dir }
options: { isServer, cwd: dir }
},
// Backwards compat
hotSelfAccept: {
......
......@@ -10,19 +10,17 @@ module.exports = babelLoader.custom(babel => {
return {
customOptions (opts) {
const custom = {
isServer: opts.isServer,
dev: opts.dev
isServer: opts.isServer
}
const loader = Object.assign({
cacheCompression: false,
cacheDirectory: true
}, opts)
delete loader.isServer
delete loader.dev
return { loader, custom }
},
config (cfg, { source, customOptions: { isServer, dev } }) {
config (cfg, { source, customOptions: { isServer } }) {
const options = Object.assign({}, cfg.options)
if (cfg.hasFilesystemConfig()) {
for (const file of [cfg.babelrc, cfg.config]) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册