@zipify/wysiwyg 1.0.0-dev.39 → 1.0.0-dev.41

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.
@@ -126,7 +126,7 @@ export default {
126
126
  };
127
127
  </script>
128
128
 
129
- <style lang="scss" scoped>
129
+ <style scoped>
130
130
  .zw-number-field {
131
131
  --border-color: rgb(var(--zw-color-n60));
132
132
  --text-color: rgb(var(--zw-color-n85));
@@ -31,7 +31,7 @@ export default {
31
31
  </script>
32
32
 
33
33
  <style scoped>
34
- @import url("~simplebar/dist/simplebar.css");
34
+ @import url("simplebar/dist/simplebar.css");
35
35
 
36
36
  .zw-scroll-view::v-deep .simplebar-placeholder {
37
37
  display: none;
@@ -61,7 +61,7 @@ export default {
61
61
  };
62
62
  </script>
63
63
 
64
- <style lang="scss" scoped>
64
+ <style scoped>
65
65
  .zw-field {
66
66
  display: flex;
67
67
  flex-direction: column;
@@ -1,12 +1,13 @@
1
- // register all icons in webpack module loader
2
- const importFile = require.context('../assets/icons', true, /\.svg/);
1
+ const modules = import.meta.glob('../assets/icons/*.svg', { as: 'raw', eager: true });
3
2
 
4
3
  export function importIcon(name) {
5
- try {
6
- return importFile(`./${name}.svg`);
7
- } catch (error) {
4
+ const icon = modules[`../assets/icons/${name}.svg`];
5
+
6
+ if (!icon) {
8
7
  // eslint-disable-next-line no-console
9
- console.warn('Cannot resolve wysiwyg icon', error);
8
+ console.warn(`[WSWG] Cannot resolve ${name} icon`);
10
9
  return '';
11
10
  }
11
+
12
+ return icon;
12
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zipify/wysiwyg",
3
- "version": "1.0.0-dev.39",
3
+ "version": "1.0.0-dev.41",
4
4
  "description": "Zipify modification of TipTap text editor",
5
5
  "main": "dist/wysiwyg.js",
6
6
  "repository": {
@@ -14,7 +14,7 @@
14
14
  "url": "https://github.com/ZipifyApps/ZipifyWysiwyg/issues"
15
15
  },
16
16
  "scripts": {
17
- "lib:build": "webpack --config ./config/webpack/lib.config.js",
17
+ "lib:build": "vite build --config ./config/vite/lib.config.js",
18
18
  "example:start": "NODE_ENV=development webpack serve --config ./config/webpack/example.config.js",
19
19
  "example:build": "NODE_ENV=production webpack --config ./config/webpack/example.config.js",
20
20
  "test:unit": "jest .",
@@ -68,6 +68,8 @@
68
68
  "style-loader": "^3.3.1",
69
69
  "stylelint": "^14.9.1",
70
70
  "svgo": "^2.8.0",
71
+ "vite": "^3.0.4",
72
+ "vite-plugin-vue2": "^2.0.2",
71
73
  "vue": "^2.7.8",
72
74
  "vue-loader": "^15.10.0",
73
75
  "vue-template-compiler": "^2.7.8",