|
1 | 1 | const path = require('path') |
2 | 2 | const webpack = require('webpack') |
3 | | -const CopyPlugin = require('copy-webpack-plugin') |
4 | 3 | const TerserPlugin = require('terser-webpack-plugin') |
5 | 4 | const HtmlWebpackPlugin = require('html-webpack-plugin') |
6 | 5 | const { CleanWebpackPlugin } = require('clean-webpack-plugin') |
7 | 6 | const ImageminPlugin = require('imagemin-webpack') |
8 | 7 |
|
9 | 8 | const ROOT = path.resolve(__dirname, 'src') |
10 | | -const NLP_DIRNAME = 'nlp' |
11 | 9 | const ASSETS_DIRNAME = 'assets' |
12 | | -const MODELS_DIRNAME = 'models' |
13 | | -const TASKS_DIRNAME = 'tasks' |
14 | 10 |
|
15 | | -const INTENT_CLASSIFICATION_DIRNAME = 'intent-classification' |
16 | 11 | const OUTPUT_PATH = path.resolve(__dirname, 'dist') |
17 | 12 | const WEBVIEWS_PATH = path.resolve(OUTPUT_PATH, 'webviews') |
18 | | -const TASKS_PATH = path.join(ROOT, NLP_DIRNAME, TASKS_DIRNAME) |
19 | | - |
20 | | -const INTENT_CLASSIFICATION_MODELS_PATH = path.join( |
21 | | - NLP_DIRNAME, |
22 | | - TASKS_DIRNAME, |
23 | | - INTENT_CLASSIFICATION_DIRNAME, |
24 | | - MODELS_DIRNAME |
25 | | -) |
26 | | -const INTENTS_ASSETS_MODELS_PATH = path.join( |
27 | | - ASSETS_DIRNAME, |
28 | | - TASKS_DIRNAME, |
29 | | - INTENT_CLASSIFICATION_DIRNAME, |
30 | | - MODELS_DIRNAME |
31 | | -) |
32 | 13 |
|
33 | 14 | const BOTONIC_PATH = path.resolve( |
34 | 15 | __dirname, |
@@ -199,7 +180,7 @@ function botonicDevConfig(mode) { |
199 | 180 | }, |
200 | 181 | resolve: resolveConfig, |
201 | 182 | devServer: { |
202 | | - static: [OUTPUT_PATH, TASKS_PATH], |
| 183 | + static: [OUTPUT_PATH], |
203 | 184 | liveReload: true, |
204 | 185 | historyApiFallback: true, |
205 | 186 | hot: true, |
@@ -332,14 +313,6 @@ function botonicNodeConfig(mode) { |
332 | 313 | IS_NODE: true, |
333 | 314 | HUBTYPE_API_URL: JSON.stringify(process.env.HUBTYPE_API_URL), |
334 | 315 | }), |
335 | | - new CopyPlugin({ |
336 | | - patterns: [ |
337 | | - { |
338 | | - from: INTENT_CLASSIFICATION_MODELS_PATH, |
339 | | - to: INTENTS_ASSETS_MODELS_PATH, |
340 | | - }, |
341 | | - ], |
342 | | - }), |
343 | 316 | ], |
344 | 317 | } |
345 | 318 | } |
|
0 commit comments