Skip to content

Commit

Permalink
scaffold-eth#21 fixed issues with theme issues and build
Browse files Browse the repository at this point in the history
  • Loading branch information
shravansunderxero committed Oct 25, 2021
1 parent 4d62b8e commit 4b0d3f0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion packages/vite-app-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"license": "MIT",
"scripts": {
"start": "cross-env ENVIRONMENT=DEVELOPMENT vite",
"build": "tsc && vite build",
"build": "tsc && yarn build:anttheme && vite build",
"build:anttheme": "yarn lessc -x -js ./src/styles/themes/light-theme.less ./public/light-theme.css && yarn lessc -x -js ./src/styles/themes/dark-theme.less ./public/dark-theme.css",
"serve": "vite preview",
"lint": "eslint --config ./.eslintrc --ignore-path ./.eslintignore ./src/**/*",
"ipfs": "node ./scripts/ipfs.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-app-ts/postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ module.exports = {
tailwindcss: {},
autoprefixer: {},
},
};
};
2 changes: 1 addition & 1 deletion packages/vite-app-ts/public/dark-theme.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/vite-app-ts/public/light-theme.css

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions packages/vite-app-ts/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ export default defineConfig({
include: /node_modules/,
transformMixedEsModules: true,
},
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
themes: resolve(__dirname, './src/styles/themes/themes.ts'),
},
},
},
esbuild: {
jsxFactory: 'jsx',
Expand All @@ -24,8 +30,6 @@ export default defineConfig({

define: {},
optimizeDeps: {
entries: ['index.html'],
//include: [],
exclude: ['@apollo/client', `graphql`],
},
resolve: {
Expand Down

0 comments on commit 4b0d3f0

Please sign in to comment.