Svelte + Webpack template for building apps with the Carbon Design System with SASS/autoprefixing support.
This set-up includes carbon-components-svelte and carbon-components.
Use degit to quickly scaffold a new project:
npx degit metonym/carbon-svelte-webpack my-app
cd my-app
yarnSASS includes from carbon-components is located in style.scss.
Place static assets (like favicons) in the public folder.
│
└───public
│ └──index.html // HTML template
└───src
└──App.svelte // base svelte file
└──index.js // app entrypoint
└──style.scss // @includes from `carbon-components`Runs the app in development mode. Visit http://localhost:8080.
Builds the app for production; output folder is build/.
Specify the port number using the port flag:
yarn start --port 3000Edit the paths variable to use different source/build paths.
// webpack.config.js
const paths = {
entry: path.resolve(__dirname, "src/index.js"),
build: path.resolve(__dirname, "build"),
public: path.resolve(__dirname, "public"),
template: path.resolve(__dirname, "public/index.html"),
};