diff --git a/examples/typescript/index.d.ts b/examples/typescript/index.d.ts deleted file mode 100644 index d4871b2cf0..0000000000 --- a/examples/typescript/index.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -//Deleting this file will cause "TS18003: No inputs were found in config file 'tsconfig.json'" - -//These declarations allow TypeScript to import non-js/ts files without the file extensions (such as .vue files) -declare module "~components/*" { -} - -declare module "~layouts/*" { -} - -declare module "~pages/*" { -} - -declare module "~assets/*" { - -} - -declare module "~static/*" { - -} diff --git a/examples/typescript/modules/typescript.js b/examples/typescript/modules/typescript.js index 9132f52892..efa5413d97 100644 --- a/examples/typescript/modules/typescript.js +++ b/examples/typescript/modules/typescript.js @@ -3,16 +3,16 @@ module.exports = function (options, next) { this.extendBuild((config) => { // Add TypeScript loader config.module.rules.push({ - test: /\.ts$/, - loader: 'ts-loader' + test: /\.ts$/, + loader: 'ts-loader' }) // Add TypeScript loader for vue files for (rule of config.module.rules) { - if (rule.loader === 'vue-loader') { - rule.query.loaders.ts = 'ts-loader?{"appendTsSuffixTo":["\\\\.vue$"]}' - } + if (rule.loader === 'vue-loader') { + rule.query.loaders.ts = 'ts-loader?{"appendTsSuffixTo":["\\\\.vue$"]}' + } } }) next() -} \ No newline at end of file +} diff --git a/examples/typescript/package.json b/examples/typescript/package.json index 6d5a5cdd9d..17973f83f6 100644 --- a/examples/typescript/package.json +++ b/examples/typescript/package.json @@ -4,7 +4,7 @@ "dependencies": { "axios": "^0.16.1", "gsap": "^1.19.1", - "nuxt": "latest", + "nuxt": "^1.0.0-alpha2", "nuxt-class-component": "^1.0.1", "tachyons": "^4.7.0", "vue-class-component": "^5.0.1", @@ -21,4 +21,4 @@ "ts-loader": "^2.0.3", "typescript": "^2.2.2" } -} \ No newline at end of file +}