Skip to content

Commit

Permalink
fix commonjs
Browse files Browse the repository at this point in the history
  • Loading branch information
zakarialaoui10 committed Oct 13, 2024
1 parent 6f556f7 commit e3c24ca
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 7 deletions.
106 changes: 102 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"build": "cross-env NODE_ENV=production rollup --config rollup.config.js"
},
"author": "",
"keywords": ["zikojs","zikojs-addons"],
"keywords": [
"zikojs",
"zikojs-addons"
],
"license": "MIT",
"dependencies": {
"@rollup/plugin-node-resolve": "^15.3.0",
Expand All @@ -20,6 +23,7 @@
"ziko": "^0.0.14"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^28.0.0",
"cross-env": "^7.0.3"
}
}
4 changes: 3 additions & 1 deletion preview/main.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import { FileBasedRouting } from "ziko";
FileBasedRouting(import.meta.glob('./src/pages/**/*.js'))
FileBasedRouting(import.meta.glob("./src/pages/**/*.js"))
// const pages = import.meta.glob("./src/pages/**/*.js")
// console.log(Object.keys(pages))
3 changes: 2 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Str } from "ziko";
import resolve from "@rollup/plugin-node-resolve";
import commonjs from '@rollup/plugin-commonjs';
import terser from "@rollup/plugin-terser";

const Addon_name = "ziko-something";
Expand Down Expand Up @@ -60,6 +61,6 @@ export default {
external: ["ziko"],
plugins: [
resolve(),
//commonjs(),
commonjs(),
],
};

0 comments on commit e3c24ca

Please sign in to comment.