daily pastebin goal
80%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export default function () {
  2.   // Nuxt resolves .ts extension
  3.   this.nuxt.options.extensions.push('ts')
  4.  
  5.   // Extend webpack build
  6.   this.extendBuild(config => {
  7.     // Add ts-loader to import .ts
  8.     config.module.rules.push({
  9.       test: /\.ts$/,
  10.       loader: 'ts-loader',
  11.       options: { appendTsSuffixTo: [/\.vue$/] }
  12.     })
  13.  
  14.     // Webpack resolves .ts extension
  15.     if (! config.resolve.extensions.includes('.ts')) {
  16.       config.resolve.extensions.push('.ts')
  17.     }
  18.   })
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top