Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-07-04 18:02:17 +0300
committerJulius Härtl <jus@bitgrid.net>2019-07-16 08:39:15 +0300
commiteee488d611f0832ada940a4f871ebd6a4c477d56 (patch)
tree05500ba77a7b5209e70efbb0c8c898a85cabae9f /webpack.common.js
parent20edf47a9ac399916c7bc93af37bb9f1e8312b94 (diff)
Move to webpack build
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'webpack.common.js')
-rw-r--r--webpack.common.js66
1 files changed, 66 insertions, 0 deletions
diff --git a/webpack.common.js b/webpack.common.js
new file mode 100644
index 00000000..72121afe
--- /dev/null
+++ b/webpack.common.js
@@ -0,0 +1,66 @@
+const path = require('path');
+const VueLoaderPlugin = require('vue-loader/lib/plugin');
+const StyleLintPlugin = require('stylelint-webpack-plugin');
+
+
+module.exports = {
+ entry: {
+ viewer: path.join(__dirname, 'src', 'viewer.js'),
+ document: path.join(__dirname, 'src', 'document.js'),
+ admin: path.join(__dirname, 'src', 'admin.js'),
+ personal: path.join(__dirname, 'src', 'personal.js'),
+ },
+ output: {
+ path: path.resolve(__dirname, './js'),
+ publicPath: '/js/',
+ filename: '[name].js',
+ chunkFilename: '[name].[chunkhash].js'
+ },
+ module: {
+ rules: [
+ /*{
+ test: /\.(js|vue)$/,
+ exclude: /node_modules/,
+ use: 'eslint-loader',
+ enforce: 'pre'
+ },*/
+ {
+ test: /\.css$/,
+ use: [
+ 'vue-style-loader',
+ 'css-loader'
+ ]
+ },
+ {
+ test: /\.scss$/,
+ use: [
+ 'vue-style-loader',
+ 'css-loader',
+ 'sass-loader'
+ ]
+ },
+ {
+ test: /\.vue$/,
+ loader: 'vue-loader'
+ },
+ {
+ test: /\.js$/,
+ loader: 'babel-loader',
+ exclude: /node_modules/
+ },
+ {
+ test: /\.(png|jpg|gif|svg)$/,
+ loader: 'url-loader'
+ }
+ ]
+ },
+ plugins: [
+ new VueLoaderPlugin()
+ ],
+ resolve: {
+ alias: {
+ vue$: 'vue/dist/vue.esm.js'
+ },
+ extensions: ['*', '.js', '.vue', '.json']
+ }
+};