Skip to content

Commit

Permalink
feat: add dev build
Browse files Browse the repository at this point in the history
  • Loading branch information
duruer committed Mar 5, 2024
1 parent fe603ac commit 1475b9a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ build

.DS_Store
node_modules
src/main/resources/plugin-ui
src/main/resources/plugin-ui

/*.mjs
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "dist/index.js",
"scripts": {
"build": "rollup -c",
"dev": "DEV=true rollup -c",
"prepublishOnly": "npm run build"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const name = pkg.name
export default [{
input: 'src/main.js',
output: [
{file: "src/main/resources/plugin-ui/server.mjs", 'format': 'es'},
{file: process.env.DEV ? "server.mjs" : "src/main/resources/plugin-ui/server.mjs", 'format': 'es'},
// { file: pkg.main, 'format': 'umd', name }
],
plugins: [
Expand All @@ -26,7 +26,7 @@ export default [{
}, {
input: 'src/main.js',
output: [
{file: "src/main/resources/plugin-ui/client.mjs", 'format': 'es', name},
{file: process.env.DEV ? "client.mjs" : "src/main/resources/plugin-ui/client.mjs", 'format': 'es', name},
// { file: pkg.main, 'format': 'umd', name }
],
plugins: [
Expand Down

0 comments on commit 1475b9a

Please sign in to comment.