persea-old/.neutrinorc.server.js

47 lines
1.0 KiB
JavaScript
Raw Normal View History

2020-06-17 11:01:01 -05:00
const {spawn} = require('child_process');
const copy = require('@neutrinojs/copy');
const node = require('@neutrinojs/node');
const {DefinePlugin} = require('webpack');
const {afterPlatform, initial} = require('./middleware');
if (!process.argv.find((arg) => arg === 'production')) {
spawn('docker', ['run', '-p', '11346:6379', 'redis'], {stdio: 'inherit'});
}
module.exports = {
options: {
root: __dirname,
},
use: [
initial({
environmentDefines: ['REDIS_ORIGIN'],
2020-06-18 07:52:38 -05:00
rawScwpPaths: [
`${__dirname}/../humus/src/common`,
`${__dirname}/../humus/src/server`,
],
scwpPaths: [
/^@avocado/,
],
2020-06-17 11:01:01 -05:00
}),
node(),
afterPlatform({
2020-06-18 07:52:38 -05:00
babelPaths: [
/^@avocado/,
],
2020-06-17 11:01:01 -05:00
externalMatcher: /(?:@avocado|@pixi|scwp|webpack)/,
}),
(neutrino) => {
neutrino.config
.plugin('avocado-define')
.use(DefinePlugin, [
{
AVOCADO_CLIENT: false,
AVOCADO_SERVER: true,
},
]);
},
],
};