You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
38 lines
1.1 KiB
const path = require('path');
|
|
|
|
module.exports = {
|
|
parser: require('postcss-comment'),
|
|
plugins: [
|
|
require('postcss-import')({
|
|
resolve(id, basedir, importOptions) {
|
|
if (id.startsWith('~@/')) {
|
|
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(3));
|
|
} else if (id.startsWith('@/')) {
|
|
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(2));
|
|
} else if (id.startsWith('/') && !id.startsWith('//')) {
|
|
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(1));
|
|
}
|
|
return id;
|
|
},
|
|
}),
|
|
// require('autoprefixer')({ remove: process.env.UNI_PLATFORM !== 'h5' }),
|
|
require('@dcloudio/vue-cli-plugin-uni/packages/postcss'),
|
|
require('tailwindcss')({ config: "./tailwind.config.js" }),
|
|
...(
|
|
process.env.UNI_PLATFORM !== 'h5'
|
|
? [
|
|
require("postcss-class-rename")({
|
|
"\\\\:": "--",
|
|
"\\\\/": "--",
|
|
"\\\\.": "--",
|
|
".:": "--",
|
|
"\\\*": "--",
|
|
})
|
|
] : [
|
|
require("autoprefixer")({
|
|
remove: true,
|
|
}),
|
|
]
|
|
)
|
|
],
|
|
};
|
|
|