The behavior of the webpack loader and vite-plugin is inconsistent. #1957
Unanswered
ninesunsabiu
asked this question in
Q&A
Replies: 1 comment
-
I applied a patch to async transform(src, id) {
if (fileRegex.test(id)) {
id = id.split("?")[0];
+ const config = getConfig({
+ configPath: linguiConfig.configPath,
+ cwd: path.dirname(id)
+ });
const catalogRelativePath = path.relative(config.rootDir, id);
const fileCatalog = getCatalogForFile(
catalogRelativePath, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In vite-plugin
js-lingui/packages/vite-plugin/src/index.ts
Lines 47 to 57 in 535d8dc
the
config
isconst config = getConfig(linguiConfig)
in line: 20js-lingui/packages/vite-plugin/src/index.ts
Line 20 in 535d8dc
but webpack loader
js-lingui/packages/loader/src/webpackLoader.ts
Lines 15 to 25 in 535d8dc
the
config
depends onthis.resourcePath
.What behavior is expected
Actually, I used the behavior of
webpack
and discovered this issue when migrating tovite
.Beta Was this translation helpful? Give feedback.
All reactions