npx degit sveltejs/template ${project_name}
yarn install
node scripts/setupTypeScript.js
yarn add svelte-check
yarn svelte-check
yarn add tailwindcss@latest postcss@latest autoprefixer@latest
yarn add svelte-preprocess
npx tailwindcss init
const production = !process.env.ROLLUP_WATCH; // Add
module.exports = {
// Add from here
purge: {
content: [
'./src/**/*.svelte',
'./src/**/*.html',
],
enabled: production, // disable purge in dev
},
// Add to here
};
import sveltePreprocess from 'svelte-preprocess'; // Add
// 中略
export default {
plugins: [
svelte({
// Add from here
preprocess: sveltePreprocess({
sourceMap: !production,
postcss: {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
],
},
}),
// Add to here
// 中略
};
yarn run dev