rollupjs

Is there any way to preserve directory structure of bundles when using rollup with code splitting?

安稳与你 提交于 2021-01-27 07:51:39
问题 Context: Given a project structure like this: ┌ src ├─┬ a │ └── module.js ├─┬ b │ └── module.js └── util.js Where both module.js files import util.js , using the following configuration: export default { experimentalCodeSplitting: true, input: [ 'src/a/module.js', 'src/b/module.js' ], output: { dir: 'bundle', format: 'esm' } }; The following structure is output: ┌ bundle ├── chunk-af6d88c4.js ├── module.js └── module2.js Problem: When using code splitting to reduce redundant code across a

Bundle JS with rollup and Babel for use in IE11

岁酱吖の 提交于 2021-01-23 11:09:22
问题 I try to bundle two JavaScript modules, so that the resulting code works in IE11. For this I have setup a yarn/npm project which uses rollup.js for bundling and Babel for transpiling. Everything works fine until I add the (non-dev) dependency core-js . Here the details: 1 Setup before adding core-js JS files src/main.js src/utils.js Config files package.json { "name": "rollup_for_ie", "devDependencies": { "@babel/core": "^7.11.1", "@babel/preset-env": "^7.11.0", "@rollup/plugin-babel": "^5.2

Bundle JS with rollup and Babel for use in IE11

风流意气都作罢 提交于 2021-01-23 11:09:10
问题 I try to bundle two JavaScript modules, so that the resulting code works in IE11. For this I have setup a yarn/npm project which uses rollup.js for bundling and Babel for transpiling. Everything works fine until I add the (non-dev) dependency core-js . Here the details: 1 Setup before adding core-js JS files src/main.js src/utils.js Config files package.json { "name": "rollup_for_ie", "devDependencies": { "@babel/core": "^7.11.1", "@babel/preset-env": "^7.11.0", "@rollup/plugin-babel": "^5.2

Bundle JS with rollup and Babel for use in IE11

℡╲_俬逩灬. 提交于 2021-01-23 11:08:14
问题 I try to bundle two JavaScript modules, so that the resulting code works in IE11. For this I have setup a yarn/npm project which uses rollup.js for bundling and Babel for transpiling. Everything works fine until I add the (non-dev) dependency core-js . Here the details: 1 Setup before adding core-js JS files src/main.js src/utils.js Config files package.json { "name": "rollup_for_ie", "devDependencies": { "@babel/core": "^7.11.1", "@babel/preset-env": "^7.11.0", "@rollup/plugin-babel": "^5.2