Comments (9)
I can confirm it works, just had to make sure I was installing the new version. Thanks a million.
from vue-pug-plugin.
The project is being supported, I still use it actively. This is likely due to the fact the package doesnt export an ES module, only CommonJS. I will investigate
from vue-pug-plugin.
@Tempystral Okay it turns out you are just using the import statement incorrectly. The following should do the trick:
import vuePugPlugin from 'vue-pug-plugin'
from vue-pug-plugin.
Interesting, I had tried that as well and it didn't seem to be working, but I will investigate further on my end. I'll update later if I have more information -- thanks!
from vue-pug-plugin.
Im using it with that syntax in a vite/vue3 project successfully. ES6/TS projects should be able to import CommonJS modules default exports like that with no issues
from vue-pug-plugin.
I have updated my test project and am now seeing the same issue. Perhaps something has changed in vite or pug packages since last time I tested it.
from vue-pug-plugin.
Actually nevermind @Tempystral - it was due to me updating to version 2.0.0 of this plugin, in which I changed the syntax.
I would recommend you doing the same, updating to version 2.0.0 changing your code to the following
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import vuePugPlugin from "vue-pug-plugin";
export default defineConfig({
root: "./src",
build: {
outDir: "../dist",
emptyOutDir: true
},
plugins: [
vue({
template: {
preprocessOptions: {
plugins: [
vuePugPlugin,
]
}
}
})
]
});
from vue-pug-plugin.
I'll give that a try, thanks. I'll let you know the result when I have a moment to sit down and test.
from vue-pug-plugin.
@Tempystral you're welcome
from vue-pug-plugin.
Related Issues (3)
- Volar support HOT 19
- Integration with eslint HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-pug-plugin.