Skip to content

Commit

Permalink
fix: bundle auro-form root component & sub-components
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisfalaska committed Nov 5, 2024
1 parent 4279def commit 7b8cac9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
13 changes: 6 additions & 7 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const production = !process.env.ROLLUP_WATCH;
const getComponentEntryPoints = () => {
const files = glob.sync('components/*/src/index.js');
return files.map(file => {
const name = path.basename(path.dirname(file));
const name = path.basename(path.dirname(path.dirname(file)));
return {
name,
input: file,
Expand All @@ -33,16 +33,15 @@ const createConfig = (name, input, output) => ({
moduleDirectories: ['node_modules']
}),
!production &&
serve({
open: true,
openPage: '/docs/'
})
serve({
open: true,
openPage: '/docs/'
})
]
});

const mainConfig = createConfig('auro-form', './index.js', 'dist');

const componentConfigs = getComponentEntryPoints().map(({ name, input, output }) =>
const componentConfigs = getComponentEntryPoints().map(({ name, input, output }) =>
createConfig(name, input, output)
);

Expand Down
13 changes: 4 additions & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"include": ["components/*/src/*.js"], // process the generated J
"include": [
"*.js", // process root level JS files
"components/*/src/*.js" // process the generated JS
],
"exclude": [],
"compilerOptions": {
// Tells TypeScript to read JS files, as
Expand All @@ -14,26 +17,18 @@
// go to js file when using IDE functions like
// "Go to Definition" in VSCode
"declarationMap": true,

// enable js modules with es6 for chai imports
"esModuleInterop": true,

// skip type checking for *.d.ts in node_modules
"skipLibCheck": true,

// 'node' matches Node.js module resolution mechanism
"moduleResolution": "node",

"target": "ES2020",

"module": "ES2020",

// include type definitions for mocha and chai testing
"types": ["mocha", "chai"],

// base directory for resolving non-relative module names
"baseUrl": ".",

// map module imports to locations in node_modules
"paths": {
"*": ["node_modules/*"]
Expand Down

0 comments on commit 7b8cac9

Please sign in to comment.