examples(coffeescript): update module (#6248)

This commit is contained in:
Artyom Bogomolov 2019-08-20 13:10:00 +02:00 committed by Pooya Parsa
parent 0e7a7b8ee3
commit a6d60d10da
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
export default function () {
// Add .coffee extension for store, middleware and more
this.nuxt.options.extensions.push('coffee')
this.nuxt.options.build.additionalExtensions.push('coffee')
// Extend build
const coffeeLoader = {
test: /\.coffee$/,

View File

@ -1,6 +1,6 @@
export default function () {
// Add .coffee extension for store, middleware and more
this.nuxt.options.extensions.push('coffee')
this.nuxt.options.build.additionalExtensions.push('coffee')
// Extend build
const coffeeLoader = {
test: /\.coffee$/,
@ -10,7 +10,7 @@ export default function () {
// Add CoffeeScruot loader
config.module.rules.push(coffeeLoader)
// Add .coffee extension in webpack resolve
if (config.resolve.extensions.indexOf('.coffee') === -1) {
if (!config.resolve.extensions.includes('.coffee')) {
config.resolve.extensions.push('.coffee')
}
})