From 50e21a89a0009813b9f090288b22c64c5cefbd58 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Tue, 27 Nov 2018 15:10:40 +0000 Subject: Suggests issues when typing title This suggests possibly related issues when the user types a title. This uses GraphQL to allow the frontend to request the exact data that is requires. We also get free caching through the Vue Apollo plugin. With this we can include the ability to import .graphql files in JS and Vue files. Also we now have the Vue test utils library to make testing Vue components easier. Closes #22071 --- config/webpack.config.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/webpack.config.js b/config/webpack.config.js index 9ecae9790fd..b9044e13f50 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -84,7 +84,7 @@ module.exports = { }, resolve: { - extensions: ['.js'], + extensions: ['.js', '.gql', '.graphql'], alias: { '~': path.join(ROOT_PATH, 'app/assets/javascripts'), emojis: path.join(ROOT_PATH, 'fixtures/emojis'), @@ -100,6 +100,11 @@ module.exports = { module: { strictExportPresence: true, rules: [ + { + type: 'javascript/auto', + test: /\.mjs$/, + use: [], + }, { test: /\.js$/, exclude: path => /node_modules|vendor[\\/]assets/.test(path) && !/\.vue\.js/.test(path), @@ -121,6 +126,11 @@ module.exports = { ].join('|'), }, }, + { + test: /\.(graphql|gql)$/, + exclude: /node_modules/, + loader: 'graphql-tag/loader', + }, { test: /\.svg$/, loader: 'raw-loader', -- cgit v1.2.3