mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
refactor: remove duplicate loader
This commit is contained in:
parent
d35c00d729
commit
919e3e7f80
@ -9,12 +9,6 @@ export default function () {
|
|||||||
this.extendBuild(config => {
|
this.extendBuild(config => {
|
||||||
// Add CoffeeScruot loader
|
// Add CoffeeScruot loader
|
||||||
config.module.rules.push(coffeeLoader)
|
config.module.rules.push(coffeeLoader)
|
||||||
// Add CoffeeScript loader for vue files
|
|
||||||
for (let rule of config.module.rules) {
|
|
||||||
if (rule.loader === 'vue-loader') {
|
|
||||||
rule.options.loaders.coffee = coffeeLoader
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Add .coffee extension in webpack resolve
|
// Add .coffee extension in webpack resolve
|
||||||
if (config.resolve.extensions.indexOf('.coffee') === -1) {
|
if (config.resolve.extensions.indexOf('.coffee') === -1) {
|
||||||
config.resolve.extensions.push('.coffee')
|
config.resolve.extensions.push('.coffee')
|
||||||
|
@ -18,12 +18,6 @@ export default function () {
|
|||||||
tsLoader
|
tsLoader
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
// Add TypeScript loader for vue files
|
|
||||||
for (let rule of config.module.rules) {
|
|
||||||
if (rule.loader === 'vue-loader') {
|
|
||||||
rule.options.loaders.ts = tsLoader
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Add .ts extension in webpack resolve
|
// Add .ts extension in webpack resolve
|
||||||
if (config.resolve.extensions.indexOf('.ts') === -1) {
|
if (config.resolve.extensions.indexOf('.ts') === -1) {
|
||||||
config.resolve.extensions.push('.ts')
|
config.resolve.extensions.push('.ts')
|
||||||
|
Loading…
Reference in New Issue
Block a user