aboutsummaryrefslogtreecommitdiffhomepage
path: root/webpack.mix.js
diff options
context:
space:
mode:
authorMarvin Borner2018-07-20 13:57:57 +0200
committerMarvin Borner2018-07-20 13:57:57 +0200
commit932d439444f10774bff546923cc0a2e5e2f2857b (patch)
treeef9bcc039d263f929b4f4991881a52a8343c1dfe /webpack.mix.js
parentbd04ac097a0a29ba7c48a5f4a46d99ae7d86eea1 (diff)
Rewrite (only for backend/oauth/api use from now on)
Diffstat (limited to 'webpack.mix.js')
-rw-r--r--[-rwxr-xr-x]webpack.mix.js87
1 files changed, 1 insertions, 86 deletions
diff --git a/webpack.mix.js b/webpack.mix.js
index 261f1f9..72fdbb1 100755..100644
--- a/webpack.mix.js
+++ b/webpack.mix.js
@@ -1,5 +1,4 @@
let mix = require('laravel-mix');
-let SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin');
/*
|--------------------------------------------------------------------------
@@ -13,88 +12,4 @@ let SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin');
*/
mix.js('resources/assets/js/app.js', 'public/js')
- .js('resources/assets/js/admin.js', 'public/js') // TODO: FIX
- .js('resources/assets/js/initial_key_gen.js', 'public/js')
- // .ts('resources/assets/js/typescript.ts', 'public/js') => for use of typescript!
- .sass('resources/assets/sass/admin.scss', 'public/css')
- .sass('resources/assets/sass/app.scss', 'public/css')
- .sourceMaps()
- .browserSync({
- files: [
- 'public/css/*.css',
- 'public/js/*.js',
- //'**/*.blade.php'
- ],
- notify: false,
- injectChanges: true,
- proxy: {
- target: '127.0.0.1:8000',
- reqHeaders: function () {
- return {
- host: 'localhost:3000'
- };
- }
- }
- })
- .disableNotifications()
- .webpackConfig({
- module: {
- rules: [{
- test: /\.css$/,
- loader: 'postcss-loader',
- options: {
- plugins: () => [require('autoprefixer')]
- }
- }]
- },
- plugins: [
- new SWPrecacheWebpackPlugin({
- cacheId: 'BEAM-Messenger',
- filename: 'service-worker.js',
- staticFileGlobs: [
- 'public/**/*.{css,js,eot,svg,ttf,woff,woff2,html}', // all compiled/public scripts
- ],
- minify: true,
- stripPrefix: 'public/',
- handleFetch: true,
- maximumFileSizeToCacheInBytes: 20971520,
- // dynamicUrlToDependencies: {
- // '/': ['resources/views/writeMessage.blade.php'],
- // '/profile': ['resources/views/profile.blade.php'],
- // // TODO: add more for even better caching => ??
- // },
- staticFileGlobsIgnorePatterns: [/\.map$/, /mix-manifest\.json$/, /manifest\.json$/],
- navigateFallback: '/',
- importScripts: ['js/service-worker-ext.js'],
- runtimeCaching: [{
- urlPattern: /^https:\/\/fonts\.googleapis\.com\//,
- handler: 'cacheFirst'
- },
- {
- urlPattern: /^https:\/\/fonts\.gstatic\.com\//,
- handler: 'cacheFirst'
- },
- {
- urlPattern: /^https:\/\/cdn\.socket\.io\//,
- handler: 'cacheFirst'
- },
- {
- urlPattern: /\/socket.io\//,
- handler: 'cacheFirst'
- },
- {
- urlPattern: /\/_debugbar\//,
- handler: 'cacheFirst'
- },
- {
- urlPattern: /\/browser-sync\//,
- handler: 'cacheFirst'
- },
- {
- urlPattern: /\/avatar\//,
- handler: 'cacheFirst'
- }
- ],
- })
- ]
- }); \ No newline at end of file
+ .sass('resources/assets/sass/app.scss', 'public/css');