Skip to content
代码片段 群组 项目
提交 a862866f 编辑于 作者: Stanislav Lashmanov's avatar Stanislav Lashmanov
浏览文件

Use raw resource query for yml imports

上级 427a1766
No related branches found
No related tags found
无相关合并请求
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon } from '@gitlab/ui';
import { captureException } from '@sentry/browser'; import { captureException } from '@sentry/browser';
import PipelineWizard from '~/pipeline_wizard/pipeline_wizard.vue'; import PipelineWizard from '~/pipeline_wizard/pipeline_wizard.vue';
import PagesWizardTemplate from '~/pipeline_wizard/templates/pages.yml'; import PagesWizardTemplate from '~/pipeline_wizard/templates/pages.yml?raw';
import { logError } from '~/lib/logger'; import { logError } from '~/lib/logger';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import { redirectTo } from '~/lib/utils/url_utility'; import { redirectTo } from '~/lib/utils/url_utility';
......
...@@ -435,6 +435,7 @@ module.exports = { ...@@ -435,6 +435,7 @@ module.exports = {
}, },
{ {
test: /\.(yml|yaml)$/, test: /\.(yml|yaml)$/,
resourceQuery: /raw/,
loader: 'raw-loader', loader: 'raw-loader',
}, },
].filter(Boolean), ].filter(Boolean),
......
...@@ -43,6 +43,8 @@ module.exports = (path, options = {}) => { ...@@ -43,6 +43,8 @@ module.exports = (path, options = {}) => {
const TEST_FIXTURES_PATTERN = 'test_fixtures(/.*)$'; const TEST_FIXTURES_PATTERN = 'test_fixtures(/.*)$';
const moduleNameMapper = { const moduleNameMapper = {
'^~(/.*)\\?raw$': '<rootDir>/app/assets/javascripts$1',
'^(.*)\\?raw$': '$1',
'^~(/.*)$': '<rootDir>/app/assets/javascripts$1', '^~(/.*)$': '<rootDir>/app/assets/javascripts$1',
'^ee_component(/.*)$': '^ee_component(/.*)$':
'<rootDir>/app/assets/javascripts/vue_shared/components/empty_component.js', '<rootDir>/app/assets/javascripts/vue_shared/components/empty_component.js',
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册