-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: updating server selector related components and logic
- Loading branch information
Showing
18 changed files
with
2,059 additions
and
1,908 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
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
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,57 +1,92 @@ | ||
// https://open-wc.org/building/building-rollup.html#configuration | ||
|
||
import { createCompatibilityConfig } from '@open-wc/building-rollup'; | ||
import { createSpaConfig } from '@open-wc/building-rollup'; | ||
import merge from 'deepmerge'; | ||
import path from 'path'; | ||
import cpy from 'rollup-plugin-cpy'; | ||
import postcss from 'rollup-plugin-postcss'; | ||
|
||
const config = createCompatibilityConfig({ | ||
const baseConfig = createSpaConfig({ | ||
developmentMode: process.env.ROLLUP_WATCH === 'true', | ||
injectServiceWorker: false, | ||
}); | ||
|
||
export default merge(baseConfig, { | ||
input: path.resolve(__dirname, 'index.html'), | ||
context: 'window', | ||
indexHTMLPlugin: { | ||
minify: { | ||
minifyJS: true, | ||
removeComments: true | ||
} | ||
} | ||
output: { | ||
sourcemap: false, | ||
}, | ||
plugins: [ | ||
postcss(), | ||
cpy({ | ||
files: [ | ||
path.join('demo', 'vendor.js'), | ||
], | ||
dest: 'dist', | ||
options: { | ||
parents: false, | ||
}, | ||
}), | ||
cpy({ | ||
files: [ | ||
path.join('demo', 'models', '*.json'), | ||
], | ||
dest: path.join('dist', 'models'), | ||
options: { | ||
parents: false, | ||
}, | ||
}), | ||
], | ||
}); | ||
|
||
// export default config; | ||
|
||
config[0].context = 'window'; | ||
config[1].context = 'window'; | ||
|
||
export default [ | ||
{ | ||
...config[0], | ||
plugins: [ | ||
...config[0].plugins, | ||
postcss() | ||
] | ||
}, | ||
{ | ||
...config[1], | ||
plugins: [ | ||
...config[1].plugins, | ||
postcss(), | ||
cpy({ | ||
files: [ | ||
path.join('demo', 'vendor.js'), | ||
], | ||
dest: 'dist', | ||
options: { | ||
parents: false, | ||
}, | ||
}), | ||
cpy({ | ||
files: [ | ||
path.join('demo', 'models', '*.json'), | ||
], | ||
dest: path.join('dist', 'models'), | ||
options: { | ||
parents: false, | ||
}, | ||
}), | ||
], | ||
}, | ||
]; | ||
// const config = createCompatibilityConfig({ | ||
// input: path.resolve(__dirname, 'index.html'), | ||
// context: 'window', | ||
// indexHTMLPlugin: { | ||
// minify: { | ||
// minifyJS: true, | ||
// removeComments: true | ||
// } | ||
// } | ||
// }); | ||
// | ||
// // export default config; | ||
// | ||
// config[0].context = 'window'; | ||
// config[1].context = 'window'; | ||
// | ||
// export default [ | ||
// { | ||
// ...config[0], | ||
// plugins: [ | ||
// ...config[0].plugins, | ||
// postcss() | ||
// ] | ||
// }, | ||
// { | ||
// ...config[1], | ||
// plugins: [ | ||
// ...config[1].plugins, | ||
// postcss(), | ||
// cpy({ | ||
// files: [ | ||
// path.join('demo', 'vendor.js'), | ||
// ], | ||
// dest: 'dist', | ||
// options: { | ||
// parents: false, | ||
// }, | ||
// }), | ||
// cpy({ | ||
// files: [ | ||
// path.join('demo', 'models', '*.json'), | ||
// ], | ||
// dest: path.join('dist', 'models'), | ||
// options: { | ||
// parents: false, | ||
// }, | ||
// }), | ||
// ], | ||
// }, | ||
// ]; |
Oops, something went wrong.