How could I include tailwind css in bundle js ?
this is the an example with vue 3 and tailwind 3 https://github.com/musashiM82/vue-webpack.
running npm run build
, it creates 3 files:
- app.js
- ABOUTPAGE.js
- app.6cba1802.css
I want to include app.6cba1802.css into app.js, so the result should be:
- app.js
- ABOUTPAGE.js
Thanks
Advertisement
Answer
You can use the css.extract option from vue cli :
https://cli.vuejs.org/config/#css-extract
JavaScript
x
11
11
1
module.exports = defineConfig({
2
transpileDependencies: true,
3
configureWebpack: {
4
5
},
6
css: {
7
extract: false
8
}
9
});
10
11