Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
- Base: wintercms/winter branch 1.2 (full framework) - Theme vivespos: Canvas 7 + Bootstrap 5 CDN, custom CSS - Layout: deferred GTM/GA4 tracking, JSON-LD SoftwareApplication - Partials: hero (offline-first), features, modes (offline/nube toggle), screenshots, pricing (3 planes), comparison, FAQ, CTA - Plugin VivesPOS.Site with ContactForm - Dockerfile: PHP 8.2 Apache, port 80, healthcheck - Added winter/wn-pages, blog, sitemap, seo plugins - Active theme set to vivespos
88 lines
2.8 KiB
Plaintext
88 lines
2.8 KiB
Plaintext
const basePath = '%base%';
|
|
const { assertSupportedNodeVersion } = require(basePath + '/node_modules/laravel-mix/src/Engine');
|
|
|
|
module.exports = async () => {
|
|
assertSupportedNodeVersion();
|
|
|
|
const mix = require(basePath + '/node_modules/laravel-mix/src/Mix').primary;
|
|
|
|
mix.listen('init', function (_mix) {
|
|
// Setup Winter path aliases
|
|
_mix._api.alias({
|
|
'$': '%pluginsPath%',
|
|
'~': '%appPath%',
|
|
});
|
|
// disable notifications if not in watch
|
|
%notificationInject%
|
|
// define options
|
|
_mix._api.options({
|
|
processCssUrls: false,
|
|
clearConsole: false,
|
|
cssNano: {
|
|
discardComments: {removeAll: true},
|
|
}
|
|
});
|
|
// enable source maps for dev builds
|
|
if (!_mix._api.inProduction()) {
|
|
_mix._api.webpackConfig({
|
|
devtool: 'inline-source-map'
|
|
});
|
|
_mix._api.sourceMaps();
|
|
}
|
|
|
|
// Disable default manifest, allow for custom manifest
|
|
if (_mix.config.manifest === 'mix-manifest.json') {
|
|
mix.manifest.refresh = _ => void 0;
|
|
} else {
|
|
if (_mix.config.manifest === true) {
|
|
_mix.config.manifest = 'mix-manifest.json';
|
|
}
|
|
}
|
|
});
|
|
|
|
// override default mix output
|
|
mix.listen("loading-plugins", function (plugins) {
|
|
plugins.forEach(function (plugin, index) {
|
|
switch (plugin.constructor.name) {
|
|
case "BuildOutputPlugin":
|
|
plugins[index].apply = function (compiler) {
|
|
compiler.hooks.done.tap('BuildOutputPlugin', stats => {
|
|
if (stats.hasErrors()) {
|
|
return false;
|
|
}
|
|
|
|
if (this.options.clearConsole) {
|
|
this.clearConsole();
|
|
}
|
|
|
|
let data = stats.toJson({
|
|
assets: true,
|
|
builtAt: true,
|
|
hash: true,
|
|
performance: true,
|
|
relatedAssets: this.options.showRelated
|
|
});
|
|
|
|
if (data.assets.length && !%silent%) {
|
|
console.log(this.statsTable(data));
|
|
}
|
|
});
|
|
};
|
|
break;
|
|
case "WebpackBarPlugin":
|
|
if (%silent% || %noProgress%) {
|
|
plugins[index].apply = _ => void 0;
|
|
}
|
|
break;
|
|
}
|
|
});
|
|
});
|
|
|
|
require('%mixConfigPath%');
|
|
|
|
await mix.installDependencies();
|
|
await mix.init();
|
|
|
|
return mix.build();
|
|
};
|