mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
examples(coffeescript): update module (#6248)
This commit is contained in:
parent
0e7a7b8ee3
commit
a6d60d10da
@ -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$/,
|
||||
|
@ -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')
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user