ember-vite-hmr 1.4.15 → 1.4.16

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/dist/lib/hmr.js +5 -2
  2. package/package.json +2 -2
package/dist/lib/hmr.js CHANGED
@@ -15,10 +15,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.hmr = hmr;
16
16
  const path_1 = __importDefault(require("path"));
17
17
  function hmr(enableViteHmrForModes = ['development']) {
18
+ let conf;
18
19
  return {
19
20
  name: 'hmr-plugin',
20
21
  enforce: 'post',
21
22
  configResolved(config) {
23
+ conf = config;
22
24
  process.env['EMBER_VITE_HMR_ENABLED'] = enableViteHmrForModes
23
25
  .includes(config.mode)
24
26
  .toString();
@@ -95,9 +97,10 @@ function hmr(enableViteHmrForModes = ['development']) {
95
97
  const dep = resultElement[1];
96
98
  const resolved = yield this.resolve(dep, resourcePath, {});
97
99
  let id = resolved.id;
98
- if (id.includes('rewritten-app') &&
100
+ let appRoot = conf.root + '/app/';
101
+ if (id.startsWith(appRoot) &&
99
102
  !id.startsWith('embroider_virtual:')) {
100
- id = id.split('rewritten-app')[1];
103
+ id = '/app/' + id.split(appRoot)[1];
101
104
  }
102
105
  if (id.startsWith('embroider_virtual:')) {
103
106
  id = '/@id/' + id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-vite-hmr",
3
- "version": "1.4.15",
3
+ "version": "1.4.16",
4
4
  "keywords": [
5
5
  "ember-addon"
6
6
  ],
@@ -93,7 +93,7 @@
93
93
  "ember-template-lint": "^5.11.2",
94
94
  "eslint": "^8.33.0",
95
95
  "eslint-config-prettier": "^9.0.0",
96
- "eslint-plugin-ember": "^11.11.1",
96
+ "eslint-plugin-ember": "^12.2.0",
97
97
  "eslint-plugin-n": "^17.9.0",
98
98
  "eslint-plugin-prettier": "^5.0.0",
99
99
  "prettier": "^3.0.3",