Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when I'm trying to run the app in dev mode #1

Open
paul-piro opened this issue Apr 26, 2023 · 1 comment
Open

Error when I'm trying to run the app in dev mode #1

paul-piro opened this issue Apr 26, 2023 · 1 comment

Comments

@paul-piro
Copy link

Hi,

I get the following error when I try to load this plugin into a project that has stache files:

[plugin:vite:stache-inline] whichModules is not a function

I'm trying to migrate the project from Webpack to Vite.
Any ideas what I do wrong?

@paul-piro
Copy link
Author

the following lines are generated in index.js

var stacheTransformer = require('stache-inline-transformer');
var whichModules = require('stache-inline-transformer/dist/transformer/modules');

the problem is those lines need to be with .default at the end, like:
var stacheTransformer = require('stache-inline-transformer').default;
var whichModules = require('stache-inline-transformer/dist/transformer/modules').default;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant