forked from andrefelipe/vite-php-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
thanks Vite team, we are almost there!
- Loading branch information
1 parent
596f82a
commit 763f924
Showing
7 changed files
with
548 additions
and
289 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
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,4 +1,4 @@ | ||
{ | ||
"index.js": "index.8857d57b.js", | ||
"style.3cee9128.css.js": "style.3cee9128.css" | ||
"index.js": "index.f81d3d49.js", | ||
"style.css": "style.ac844bda.css" | ||
} |
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,30 +1,20 @@ | ||
const cors = require('@koa/cors') | ||
import outputManifest from 'rollup-plugin-output-manifest' | ||
|
||
export default { | ||
|
||
// our output dir for production build | ||
// our entry file | ||
entry: 'src/index.js', | ||
|
||
// output dir for production build | ||
outDir: '../public/dist', | ||
|
||
// output our manifest | ||
rollupInputOptions: { | ||
plugins: [outputManifest({ | ||
outputPath: '../public/dist/_assets', | ||
filter: a => !!a | ||
})] | ||
}, | ||
// emit manifest so PHP can find the hashed files | ||
emitManifest: true, | ||
|
||
// we don't need to output the index.html | ||
emitIndex: false, | ||
// required to load scripts from custom host | ||
cors: true, | ||
|
||
// required for in-browser template compilation | ||
// https://v3.vuejs.org/guide/installation.html#with-a-bundler | ||
alias: { | ||
vue: "vue/dist/vue.esm-bundler.js" | ||
}, | ||
|
||
// required to load scripts from localhost | ||
configureServer: ({ app }) => { | ||
app.use(cors({ origin: '*' })) | ||
} | ||
} |