From d3e1d50cf04355928aaedbf658a2711ff3d33fe4 Mon Sep 17 00:00:00 2001 From: cha0s Date: Tue, 23 Mar 2021 01:56:24 -0500 Subject: [PATCH] refactor: assets belong to http --- packages/core/src/build.js | 7 ------- packages/http/src/build/neutrino/targets.js | 9 +++++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/core/src/build.js b/packages/core/src/build.js index e75a4e6..2ebf63a 100644 --- a/packages/core/src/build.js +++ b/packages/core/src/build.js @@ -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') diff --git a/packages/http/src/build/neutrino/targets.js b/packages/http/src/build/neutrino/targets.js index fb3efb3..9f9a431 100644 --- a/packages/http/src/build/neutrino/targets.js +++ b/packages/http/src/build/neutrino/targets.js @@ -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, [{