-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from odestry/vite-plugin
feat: added vite plugin
- Loading branch information
Showing
11 changed files
with
72 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"entry.theme.js": { | ||
"file": "entry.theme.-1DTOjwF.min.js", | ||
"name": "entry.theme", | ||
"src": "entry.theme.js", | ||
"isEntry": true, | ||
"css": [ | ||
"entry.YiHgjETv.min.css" | ||
] | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export function counter (num) { | ||
return num + 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { counter } from './counter' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import '~/styles/tailwind.css'; | ||
|
||
import { counter } from '~/components' | ||
|
||
console.log(counter(1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,28 @@ | ||
import { defineConfig } from 'vite' | ||
import { defineConfig } from 'vite'; | ||
import path from 'path' | ||
import shopify from 'vite-plugin-shopify'; | ||
import cleanup from '@by-association-only/vite-plugin-shopify-clean' | ||
|
||
export default defineConfig({ | ||
resolve: { | ||
alias: { | ||
'~': path.resolve(__dirname, './'), | ||
}, | ||
}, | ||
plugins: [ | ||
shopify({ | ||
additionalEntrypoints: ['entry.theme.js'], | ||
snippetFile: 'entry.liquid' | ||
}), | ||
cleanup() | ||
], | ||
build: { | ||
outDir: 'assets', | ||
emptyOutDir: false, | ||
minify: false, | ||
rollupOptions: { | ||
input: 'styles.css', | ||
output: { | ||
dir: 'assets', | ||
assetFileNames: '[name][extname]', | ||
entryFileNames: '[name].[hash].min.js', | ||
chunkFileNames: '[name].[hash].min.js', | ||
assetFileNames: '[name].[hash].min[extname]' | ||
} | ||
} | ||
} | ||
}) | ||
}); |