Skip to content

Commit

Permalink
chore: fix vue examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Austaras committed Jan 15, 2021
1 parent 7621de5 commit f6134c8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 36 deletions.
8 changes: 7 additions & 1 deletion examples/vue-cssextract/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="panel-container">
<div class="panel-container foobar">
<welcome :exampleName="exampleName" :statusMessage="statusMessage" :logoData="logoData" />
<clicks />
</div>
Expand Down Expand Up @@ -30,3 +30,9 @@
}
}
</script>

<style scoped>
.foobar {
font-family: monospace
}
</style>
25 changes: 7 additions & 18 deletions examples/vue-cssextract/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,19 @@ module.exports = {
use: BabelMultiTargetPlugin.loader(),
}, {
test: /\.vue$/,
use: [
BabelMultiTargetPlugin.loader('vue-loader'),
],
use: BabelMultiTargetPlugin.loader('vue-loader'),
},
{
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: MiniCssExtractPlugin.loader,
options: {
esModule: false,
},
},
'css-loader',
],
}],
},

node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
setImmediate: false,
// prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
// eslint-disable-next-line camelcase
child_process: 'empty',
},
}
18 changes: 1 addition & 17 deletions examples/vue-dynamic-import/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ module.exports = {
},
{
test: /\.vue$/,
use: [
BabelMultiTargetPlugin.loader('vue-loader'),
],
use: BabelMultiTargetPlugin.loader('vue-loader'),
},
{
test: /\.css$/,
Expand All @@ -38,18 +36,4 @@ module.exports = {
},
],
},

node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
setImmediate: false,
// prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
// eslint-disable-next-line camelcase
child_process: 'empty',
},
}
1 change: 1 addition & 0 deletions examples/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ module.exports = (workingDir, examples, options = {}) => ({
{
test: /\.html$/,
loader: 'html-loader',
enforce: 'post'
},
{
test: /\.(jpe?g|png|gif)/,
Expand Down

0 comments on commit f6134c8

Please sign in to comment.