summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-11-27 15:10:40 +0000
committerPhil Hughes <me@iamphill.com>2018-11-27 15:10:40 +0000
commit50e21a89a0009813b9f090288b22c64c5cefbd58 (patch)
tree7a142c12573f872f14ac366ec00082c650664592 /config
parent15b4a8f93aaf313b8197ca381f529b00bd231a20 (diff)
downloadgitlab-ce-50e21a89a0009813b9f090288b22c64c5cefbd58.tar.gz
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
Diffstat (limited to 'config')
-rw-r--r--config/webpack.config.js12
1 files changed, 11 insertions, 1 deletions
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'),
@@ -101,6 +101,11 @@ module.exports = {
strictExportPresence: true,
rules: [
{
+ type: 'javascript/auto',
+ test: /\.mjs$/,
+ use: [],
+ },
+ {
test: /\.js$/,
exclude: path => /node_modules|vendor[\\/]assets/.test(path) && !/\.vue\.js/.test(path),
loader: 'babel-loader',
@@ -122,6 +127,11 @@ module.exports = {
},
},
{
+ test: /\.(graphql|gql)$/,
+ exclude: /node_modules/,
+ loader: 'graphql-tag/loader',
+ },
+ {
test: /\.svg$/,
loader: 'raw-loader',
},