Home > database >  include tailwind css in bundle js
include tailwind css in bundle js

Time:05-03

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

CodePudding user response:

You can use the css.extract option from vue cli :

https://cli.vuejs.org/config/#css-extract


module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    ...
  },
  css: {
       extract: false
  }
});

  • Related