Skip to content

Commit

Permalink
examples(coffeescript): update module (#6248)
Browse files Browse the repository at this point in the history
  • Loading branch information
devartyom authored and pi0 committed Aug 20, 2019
1 parent 0e7a7b8 commit a6d60d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/coffeescript/modules/coffeescript.js
@@ -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$/,
Expand Down
4 changes: 2 additions & 2 deletions examples/pug-stylus-coffee/modules/coffeescript.js
@@ -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$/,
Expand All @@ -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')
}
})
Expand Down

0 comments on commit a6d60d1

Please sign in to comment.