Skip to content

Commit

Permalink
Disable vue style loader (#2981)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecrypticace committed May 17, 2021
1 parent b45f7a1 commit eeb3dd8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
6 changes: 1 addition & 5 deletions src/components/CssWebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,7 @@ class CssWebpackConfig extends AutomaticComponent {
}

if (method === 'inline') {
if (Mix.components.get('vue') && location === 'default') {
loaders.push({ loader: 'vue-style-loader' });
} else {
loaders.push({ loader: 'style-loader' });
}
loaders.push({ loader: 'style-loader' });
} else if (method === 'extract') {
loaders.push({
loader: MiniCssExtractPlugin.loader,
Expand Down
6 changes: 3 additions & 3 deletions test/features/vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ test('it knows the Vue 2 compiler name', t => {
t.true(dependencies.includes('vue-template-compiler'));
});

test('it switches to vue-style-loader when not extracting styles', async t => {
test('DISABLED: it switches to vue-style-loader when not extracting styles', async t => {
mix.vue({ version: 2, extractStyles: false });

const config = await webpack.buildConfig();

assert.hasWebpackLoader(t, config, 'vue-style-loader');
assert.doesNotHaveWebpackLoader(t, config, 'style-loader');
assert.doesNotHaveWebpackLoader(t, config, 'vue-style-loader');
assert.hasWebpackLoader(t, config, 'style-loader');
assert.doesNotHaveWebpackLoader(t, config, /mini-css-extract-plugin/);
});

Expand Down
6 changes: 3 additions & 3 deletions test/features/vue3.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ test('it knows the Vue 3 compiler name', t => {
t.true(dependencies.includes('@vue/compiler-sfc'));
});

test('it switches to vue-style-loader when not extracting styles', async t => {
test('DISABLED: it switches to vue-style-loader when not extracting styles', async t => {
mix.vue({ version: 3, extractStyles: false });

const config = await webpack.buildConfig();

assert.hasWebpackLoader(t, config, 'vue-style-loader');
assert.doesNotHaveWebpackLoader(t, config, 'style-loader');
assert.doesNotHaveWebpackLoader(t, config, 'vue-style-loader');
assert.hasWebpackLoader(t, config, 'style-loader');
assert.doesNotHaveWebpackLoader(t, config, loader =>
loader.includes('mini-css-extract-plugin')
);
Expand Down

0 comments on commit eeb3dd8

Please sign in to comment.