aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/webpack.base.conf.js17
-rw-r--r--build/webpack.dev.conf.js4
-rw-r--r--build/webpack.prod.conf.js4
3 files changed, 20 insertions, 5 deletions
diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js
index 900d824b..f442b2a0 100644
--- a/build/webpack.base.conf.js
+++ b/build/webpack.base.conf.js
@@ -4,6 +4,7 @@ var utils = require('./utils')
var projectRoot = path.resolve(__dirname, '../')
var ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin')
var CopyPlugin = require('copy-webpack-plugin');
+var { VueLoaderPlugin } = require('vue-loader')
var env = process.env.NODE_ENV
// check env & config/index.js to decide weither to enable CSS Sourcemaps for the
@@ -29,12 +30,11 @@ module.exports = {
}
},
resolve: {
- extensions: ['.js', '.vue'],
+ extensions: ['.js', '.jsx', '.vue'],
modules: [
path.join(__dirname, '../node_modules')
],
alias: {
- 'vue$': 'vue/dist/vue.runtime.common',
'static': path.resolve(__dirname, '../static'),
'src': path.resolve(__dirname, '../src'),
'assets': path.resolve(__dirname, '../src/assets'),
@@ -60,7 +60,17 @@ module.exports = {
},
{
test: /\.vue$/,
- use: 'vue-loader'
+ loader: 'vue-loader',
+ options: {
+ compilerOptions: {
+ isCustomElement(tag) {
+ if (tag === 'pinch-zoom') {
+ return true
+ }
+ return false
+ }
+ }
+ }
},
{
test: /\.jsx?$/,
@@ -95,6 +105,7 @@ module.exports = {
entry: path.join(__dirname, '..', 'src/sw.js'),
filename: 'sw-pleroma.js'
}),
+ new VueLoaderPlugin(),
// This copies Ruffle's WASM to a directory so that JS side can access it
new CopyPlugin({
patterns: [
diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js
index 159572ba..4605b93d 100644
--- a/build/webpack.dev.conf.js
+++ b/build/webpack.dev.conf.js
@@ -21,7 +21,9 @@ module.exports = merge(baseWebpackConfig, {
new webpack.DefinePlugin({
'process.env': config.dev.env,
'COMMIT_HASH': JSON.stringify('DEV'),
- 'DEV_OVERRIDES': JSON.stringify(config.dev.settings)
+ 'DEV_OVERRIDES': JSON.stringify(config.dev.settings),
+ '__VUE_OPTIONS_API__': true,
+ '__VUE_PROD_DEVTOOLS__': false
}),
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage
new webpack.HotModuleReplacementPlugin(),
diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js
index ed11ebad..a67ed2f6 100644
--- a/build/webpack.prod.conf.js
+++ b/build/webpack.prod.conf.js
@@ -36,7 +36,9 @@ var webpackConfig = merge(baseWebpackConfig, {
new webpack.DefinePlugin({
'process.env': env,
'COMMIT_HASH': JSON.stringify(commitHash),
- 'DEV_OVERRIDES': JSON.stringify(undefined)
+ 'DEV_OVERRIDES': JSON.stringify(undefined),
+ '__VUE_OPTIONS_API__': true,
+ '__VUE_PROD_DEVTOOLS__': false
}),
// extract css into its own file
new MiniCssExtractPlugin({