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({ clean({
cleanOnceBeforeBuildPatterns: ['**/*.hot-update.*'], cleanOnceBeforeBuildPatterns: ['**/*.hot-update.*'],
})(neutrino); })(neutrino);
const copy = r('@neutrinojs/copy');
copy({
patterns: [{
from: 'src/assets',
to: 'http',
}],
})(neutrino);
const {EnvironmentPlugin} = r('webpack'); const {EnvironmentPlugin} = r('webpack');
neutrino.config neutrino.config
.plugin('environment') .plugin('environment')

View File

@ -5,6 +5,15 @@ const fs = require('fs');
const {DefinePlugin} = require('webpack'); const {DefinePlugin} = require('webpack');
module.exports = () => (neutrino) => { 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 neutrino.config
.plugin('environment') .plugin('environment')
.use(DefinePlugin, [{ .use(DefinePlugin, [{