refactor: assets belong to http

This commit is contained in:
cha0s 2021-03-23 01:56:24 -05:00
parent b944300e38
commit d3e1d50cf0
2 changed files with 9 additions and 7 deletions

View File

@ -27,13 +27,6 @@ export default (latus) => (neutrino) => {
clean({
cleanOnceBeforeBuildPatterns: ['**/*.hot-update.*'],
})(neutrino);
const copy = r('@neutrinojs/copy');
copy({
patterns: [{
from: 'src/assets',
to: 'http',
}],
})(neutrino);
const {EnvironmentPlugin} = r('webpack');
neutrino.config
.plugin('environment')

View File

@ -5,6 +5,15 @@ const fs = require('fs');
const {DefinePlugin} = require('webpack');
module.exports = () => (neutrino) => {
// eslint-disable-next-line no-eval
const r = eval('require');
const copy = r('@neutrinojs/copy');
copy({
patterns: [{
from: join(neutrino.options.root, 'src', 'assets'),
to: 'http',
}],
})(neutrino);
neutrino.config
.plugin('environment')
.use(DefinePlugin, [{