@lingo.dev/_compiler 0.1.6 → 0.1.8

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.
package/build/index.cjs CHANGED
@@ -4,7 +4,7 @@ var _unplugin = require('unplugin');
4
4
  // package.json
5
5
  var package_default = {
6
6
  name: "@lingo.dev/_compiler",
7
- version: "0.1.6",
7
+ version: "0.1.8",
8
8
  description: "Lingo.dev Compiler",
9
9
  private: false,
10
10
  publishConfig: {
@@ -707,7 +707,7 @@ var LCP = class _LCP {
707
707
  save() {
708
708
  const hasChanges = !fs.existsSync(this.filePath) || fs.readFileSync(this.filePath, "utf8") !== this.toString();
709
709
  if (hasChanges) {
710
- const dir = this.filePath.substring(0, this.filePath.lastIndexOf("/"));
710
+ const dir = path.dirname(this.filePath);
711
711
  if (!fs.existsSync(dir)) {
712
712
  fs.mkdirSync(dir, { recursive: true });
713
713
  }
@@ -716,7 +716,7 @@ var LCP = class _LCP {
716
716
  }
717
717
  }
718
718
  _triggerLCPReload() {
719
- const dir = this.filePath.substring(0, this.filePath.lastIndexOf("/"));
719
+ const dir = path.dirname(this.filePath);
720
720
  const filePath = path.resolve(dir, LCP_DICTIONARY_FILE_NAME);
721
721
  if (fs.existsSync(filePath)) {
722
722
  const now = Date.now();
@@ -2400,7 +2400,7 @@ var src_default = {
2400
2400
  ...nextConfig,
2401
2401
  // what if we already have a webpack config?
2402
2402
  webpack: (config2, { isServer }) => {
2403
- config2.plugins.push(
2403
+ config2.plugins.unshift(
2404
2404
  unplugin.webpack(
2405
2405
  _lodash2.default.merge({}, defaultParams, { rsc: true }, compilerParams)
2406
2406
  )
@@ -2409,7 +2409,7 @@ var src_default = {
2409
2409
  }
2410
2410
  }),
2411
2411
  vite: (compilerParams) => (config2) => {
2412
- config2.plugins.push(
2412
+ config2.plugins.unshift(
2413
2413
  unplugin.vite(_lodash2.default.merge({}, defaultParams, { rsc: false }, compilerParams))
2414
2414
  );
2415
2415
  return config2;
package/build/index.mjs CHANGED
@@ -4,7 +4,7 @@ import { createUnplugin } from "unplugin";
4
4
  // package.json
5
5
  var package_default = {
6
6
  name: "@lingo.dev/_compiler",
7
- version: "0.1.6",
7
+ version: "0.1.8",
8
8
  description: "Lingo.dev Compiler",
9
9
  private: false,
10
10
  publishConfig: {
@@ -707,7 +707,7 @@ var LCP = class _LCP {
707
707
  save() {
708
708
  const hasChanges = !fs.existsSync(this.filePath) || fs.readFileSync(this.filePath, "utf8") !== this.toString();
709
709
  if (hasChanges) {
710
- const dir = this.filePath.substring(0, this.filePath.lastIndexOf("/"));
710
+ const dir = path.dirname(this.filePath);
711
711
  if (!fs.existsSync(dir)) {
712
712
  fs.mkdirSync(dir, { recursive: true });
713
713
  }
@@ -716,7 +716,7 @@ var LCP = class _LCP {
716
716
  }
717
717
  }
718
718
  _triggerLCPReload() {
719
- const dir = this.filePath.substring(0, this.filePath.lastIndexOf("/"));
719
+ const dir = path.dirname(this.filePath);
720
720
  const filePath = path.resolve(dir, LCP_DICTIONARY_FILE_NAME);
721
721
  if (fs.existsSync(filePath)) {
722
722
  const now = Date.now();
@@ -2400,7 +2400,7 @@ var src_default = {
2400
2400
  ...nextConfig,
2401
2401
  // what if we already have a webpack config?
2402
2402
  webpack: (config2, { isServer }) => {
2403
- config2.plugins.push(
2403
+ config2.plugins.unshift(
2404
2404
  unplugin.webpack(
2405
2405
  _11.merge({}, defaultParams, { rsc: true }, compilerParams)
2406
2406
  )
@@ -2409,7 +2409,7 @@ var src_default = {
2409
2409
  }
2410
2410
  }),
2411
2411
  vite: (compilerParams) => (config2) => {
2412
- config2.plugins.push(
2412
+ config2.plugins.unshift(
2413
2413
  unplugin.vite(_11.merge({}, defaultParams, { rsc: false }, compilerParams))
2414
2414
  );
2415
2415
  return config2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingo.dev/_compiler",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Lingo.dev Compiler",
5
5
  "private": false,
6
6
  "publishConfig": {