summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/webpack.js
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-02-11 11:27:51 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-02-13 09:46:29 +0100
commit58ecc7d000e682df51c14562f369900dcd0f1eec (patch)
treedf0c23636f6c33fe80d988ea5b83129f2d6d1d9c /apps/files_trashbin/webpack.js
parenteab46d1ab151d87f8ddbe50b8719f22c7e5ec765 (diff)
downloadnextcloud-server-58ecc7d000e682df51c14562f369900dcd0f1eec.tar.gz
nextcloud-server-58ecc7d000e682df51c14562f369900dcd0f1eec.zip
Move files_trashbin to webpack
Combine the 2 js files and the scss. This saves compiling the scss on the go. And going via Nextcloud storage to obtain it. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_trashbin/webpack.js')
-rw-r--r--apps/files_trashbin/webpack.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/apps/files_trashbin/webpack.js b/apps/files_trashbin/webpack.js
new file mode 100644
index 00000000000..2261fb08d36
--- /dev/null
+++ b/apps/files_trashbin/webpack.js
@@ -0,0 +1,37 @@
+const path = require('path');
+
+module.exports = {
+ entry: path.join(__dirname, 'src', 'files_trashbin.js'),
+ output: {
+ path: path.resolve(__dirname, './js'),
+ publicPath: '/js/',
+ filename: 'files_trashbin.js'
+ },
+ module: {
+ rules: [
+ {
+ test: /\.css$/,
+ use: ['style-loader', 'css-loader']
+ },
+ {
+ test: /\.scss$/,
+ use: ['style-loader', 'css-loader', 'sass-loader']
+ },
+ {
+ test: /\.js$/,
+ loader: 'babel-loader',
+ exclude: /node_modules/
+ },
+ {
+ test: /\.(png|jpg|gif|svg)$/,
+ loader: 'file-loader',
+ options: {
+ name: '[name].[ext]?[hash]'
+ }
+ }
+ ]
+ },
+ resolve: {
+ extensions: ['*', '.js']
+ }
+};