diff --git a/.gitignore b/.gitignore index 02f2cfaf8..55d383c8a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,20 +8,6 @@ /.vs/ yarn-error.log* -/static/packs -/static/packs-test -/static/emoji -/static/index.html -/static/index.html.gz -/static/404.html -/static/404.html.gz -/static/manifest.json -/static/manifest.json.gz -/static/report.html -/static/sw.js -/static/instance/** -!/static/instance/**.example -!/static/instance/**.example.* -!/static/instance/**.example/** -/static-test -/public +/static/ +/static-test/ +/public/ diff --git a/static/instance/about.example/dmca.html b/app/instance/about.example/dmca.html similarity index 100% rename from static/instance/about.example/dmca.html rename to app/instance/about.example/dmca.html diff --git a/static/instance/about.example/index.html b/app/instance/about.example/index.html similarity index 100% rename from static/instance/about.example/index.html rename to app/instance/about.example/index.html diff --git a/static/instance/about.example/privacy.html b/app/instance/about.example/privacy.html similarity index 100% rename from static/instance/about.example/privacy.html rename to app/instance/about.example/privacy.html diff --git a/static/instance/about.example/tos.html b/app/instance/about.example/tos.html similarity index 100% rename from static/instance/about.example/tos.html rename to app/instance/about.example/tos.html diff --git a/static/instance/soapbox.example.json b/app/instance/soapbox.example.json similarity index 100% rename from static/instance/soapbox.example.json rename to app/instance/soapbox.example.json diff --git a/static/sounds/boop.mp3 b/app/sounds/boop.mp3 similarity index 100% rename from static/sounds/boop.mp3 rename to app/sounds/boop.mp3 diff --git a/static/sounds/boop.ogg b/app/sounds/boop.ogg similarity index 100% rename from static/sounds/boop.ogg rename to app/sounds/boop.ogg diff --git a/static/sounds/chat.mp3 b/app/sounds/chat.mp3 similarity index 100% rename from static/sounds/chat.mp3 rename to app/sounds/chat.mp3 diff --git a/static/sounds/chat.oga b/app/sounds/chat.oga similarity index 100% rename from static/sounds/chat.oga rename to app/sounds/chat.oga diff --git a/static/instance/about.example/.gitkeep b/static/instance/about.example/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/webpack/configuration.js b/webpack/configuration.js index 1e80b65a6..3cd09e2ae 100644 --- a/webpack/configuration.js +++ b/webpack/configuration.js @@ -7,7 +7,7 @@ const settings = { test_root_path: 'static-test', cache_path: 'tmp/cache/webpacker', resolved_paths: [], - static_assets_extensions: [ '.jpg', '.jpeg', '.png', '.tiff', '.ico', '.svg', '.gif', '.eot', '.otf', '.ttf', '.woff', '.woff2' ], + static_assets_extensions: [ '.jpg', '.jpeg', '.png', '.tiff', '.ico', '.svg', '.gif', '.eot', '.otf', '.ttf', '.woff', '.woff2', '.mp3', '.ogg', '.oga' ], extensions: [ '.mjs', '.js', '.sass', '.scss', '.css', '.module.sass', '.module.scss', '.module.css', '.png', '.svg', '.gif', '.jpeg', '.jpg' ], }; diff --git a/webpack/production.js b/webpack/production.js index 1398d35c8..01ba2d76b 100644 --- a/webpack/production.js +++ b/webpack/production.js @@ -36,7 +36,10 @@ module.exports = merge(sharedConfig, { plugins: [ new CompressionPlugin({ - test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map)$/, + test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map|mp3|ogg|oga)$/, + exclude: [ + 'instance', + ], }), new BundleAnalyzerPlugin({ // generates report.html analyzerMode: 'static', diff --git a/webpack/shared.js b/webpack/shared.js index df3861563..f8aca4794 100644 --- a/webpack/shared.js +++ b/webpack/shared.js @@ -101,6 +101,12 @@ module.exports = { }, { from: join(__dirname, '../node_modules/emoji-datasource/img/twitter/sheets/32.png'), to: join(output.path, 'emoji/sheet_13.png'), + }, { + from: join(__dirname, '../app/sounds'), + to: join(output.path, 'sounds'), + }, { + from: join(__dirname, '../app/instance'), + to: join(output.path, 'instance'), }], options: { concurrency: 100,