mod-build 4.0.0-alpha.18 → 4.0.0-alpha.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/vite.config.js +21 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "4.0.0-alpha.18",
3
+ "version": "4.0.0-alpha.19",
4
4
  "description": "Share components for S3 sites.",
5
5
  "type": "module",
6
6
  "scripts": {
package/vite.config.js CHANGED
@@ -6,6 +6,8 @@ import { startModBuild } from './tasks/serve.js'
6
6
  import { handlebarsHelpers, updateConfig } from './src/scripts/utils.js'
7
7
  import gulpHandlebarsFileInclude from 'gulp-handlebars-file-include'
8
8
  import eslint from 'vite-plugin-eslint'
9
+ import path from 'node:path'
10
+ import viteStaticCopy from 'vite-plugin-static-copy'
9
11
 
10
12
  export default defineConfig((config) => ({
11
13
  build: {
@@ -26,6 +28,22 @@ export default defineConfig((config) => ({
26
28
  }),
27
29
  gulpHandlebarsFileInclude({}, { handlebarsHelpers, maxRecursion: 500 }),
28
30
  updateConfig(config),
31
+ viteStaticCopy({
32
+ targets: [
33
+ {
34
+ src: path.resolve(__dirname, './src/resources'),
35
+ dest: './'
36
+ },
37
+ {
38
+ src: path.resolve(__dirname, './src/fonts'),
39
+ dest: './'
40
+ },
41
+ {
42
+ src: path.resolve(__dirname, './src/videos'),
43
+ dest: './'
44
+ },
45
+ ],
46
+ }),
29
47
  {
30
48
  ...eslint(),
31
49
  apply: 'build',
@@ -44,7 +62,8 @@ export default defineConfig((config) => ({
44
62
  },
45
63
  resolve: {
46
64
  alias: {
47
- '@': '/src'
65
+ '@': path.resolve(__dirname, './node_modules/mod-build/src'),
66
+ '~': path.resolve(__dirname, './node_modules/mod-base/src'),
48
67
  }
49
- }
68
+ },
50
69
  }))