refactor: assets belong to http
This commit is contained in:
parent
b944300e38
commit
d3e1d50cf0
|
@ -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')
|
||||||
|
|
|
@ -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, [{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user