Progress
This commit is contained in:
@@ -8,9 +8,6 @@ const { readFileSync } = require('fs');
|
||||
const configPath = resolve('config', 'webpacker.yml');
|
||||
const settings = safeLoad(readFileSync(configPath), 'utf8')[env.RAILS_ENV || env.NODE_ENV];
|
||||
|
||||
const themePath = resolve('config', 'themes.yml');
|
||||
const themes = safeLoad(readFileSync(themePath), 'utf8');
|
||||
|
||||
function removeOuterSlashes(string) {
|
||||
return string.replace(/^\/*/, '').replace(/\/*$/, '');
|
||||
}
|
||||
@@ -31,7 +28,6 @@ const output = {
|
||||
|
||||
module.exports = {
|
||||
settings,
|
||||
themes,
|
||||
env: {
|
||||
CDN_HOST: env.CDN_HOST,
|
||||
NODE_ENV: env.NODE_ENV,
|
||||
|
||||
@@ -95,13 +95,13 @@ module.exports = merge(sharedConfig, {
|
||||
'**/*-webfont-*.svg',
|
||||
'**/*.woff',
|
||||
],
|
||||
// ServiceWorker: {
|
||||
// entry: `imports-loader?ATTACHMENT_HOST=>${encodeURIComponent(JSON.stringify(attachmentHost))}!${encodeURI(path.join(__dirname, '../../app/javascript/gabsocial/service_worker/entry.js'))}`,
|
||||
// cacheName: 'gabsocial',
|
||||
// output: '../assets/sw.js',
|
||||
// publicPath: '/sw.js',
|
||||
// minify: true,
|
||||
// },
|
||||
ServiceWorker: {
|
||||
entry: `imports-loader?ATTACHMENT_HOST=>${encodeURIComponent(JSON.stringify(attachmentHost))}!${encodeURI(path.join(__dirname, '../../app/javascript/gabsocial/service_worker/entry.js'))}`,
|
||||
cacheName: 'gabsocial',
|
||||
output: '../assets/sw.js',
|
||||
publicPath: '/sw.js',
|
||||
minify: true,
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
const { join, resolve } = require('path');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const { settings, themes } = require('../configuration');
|
||||
|
||||
let pathy = resolve(join(settings.source_path, themes.default));
|
||||
|
||||
module.exports = {
|
||||
test: /\.s?css$/i,
|
||||
@@ -12,7 +8,7 @@ module.exports = {
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
importLoaders: 2,
|
||||
importLoaders: 1,
|
||||
modules: true,
|
||||
localIdentName: '[hash:base64:5]',
|
||||
},
|
||||
@@ -23,20 +19,5 @@ module.exports = {
|
||||
sourceMap: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
implementation: require('sass'),
|
||||
sourceMap: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'sass-resources-loader',
|
||||
options: {
|
||||
resources: [
|
||||
pathy,
|
||||
]
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -6,9 +6,12 @@ const { sync } = require('glob');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const AssetsManifestPlugin = require('webpack-assets-manifest');
|
||||
const extname = require('path-complete-extname');
|
||||
const { env, settings, themes, output } = require('./configuration');
|
||||
const { env, settings, output } = require('./configuration');
|
||||
const rules = require('./rules');
|
||||
const localePackPaths = require('./generateLocalePacks');
|
||||
const localePackPaths = [
|
||||
'/Users/m3/Documents/dev/gab-social/tmp/packs/locale_en.js',
|
||||
];
|
||||
//require('./generateLocalePacks');
|
||||
|
||||
const extensionGlob = `**/*{${settings.extensions.join(',')}}*`;
|
||||
const entryPath = join(settings.source_path, settings.source_entry_path);
|
||||
|
||||
Reference in New Issue
Block a user