rollupjs

Rollup issue: resolve failed, mootools already loaded, must be run with ava?

删除回忆录丶 提交于 2020-01-06 18:03:31
问题 I'm having an error that makes absolutely no sense. I haven't run rollup -c in about an month and running it now is causing all sorts of mayhem. 1) mootools already loaded Why on earth is mootools already loaded in the log of this error? What is using mootools ? 2) How is rolllup triggering ava? If you scroll all the way at the bottom, I keen getting this random issue complaining that the bin itself needs to be run with ava . Test files must be run with the AVA CLI: `ava node_modules/.bin

Build Angular module with rollup.js: external html template file won't work (404)

老子叫甜甜 提交于 2020-01-05 08:02:12
问题 I'm developing an Angular lib (GitHub repo link), there are lib module sources placed at ./src test App sources placed at ./app lib distributive at ./dist The build process uses rollup.js and is based on angular-library-starter. I also have a process that generates npm package from ./dist and installs it to ./node_modules . The issue is that the App works fine with the lib module imported from ./src and does not work when I imported it from ./dist or ./node_modules : // ./app/app/app.module

How to resolve rollup build error when using emotion: 'default' is not exported by @emotion\memoize\dist\memoize.cjs.js

核能气质少年 提交于 2019-12-25 02:49:21
问题 I'm trying to build a standardized react button component for our enterprise library. I want to be able to use @emotion/styled to generate the styled react component. We are using rollup as our package builder, which is transpiling from typescript to esm and commonjs. When I run the build, I'm getting the following error: Error: 'default' is not exported by node_modules\@emotion\memoize\dist\memoize.cjs.js node_modules\@emotion\is-prop-valid\dist\is-prop-valid.esm.js (1:7) 1: import memoize

Deploying angular 2 app Aot with Rollup and external dependencies

白昼怎懂夜的黑 提交于 2019-12-12 09:56:36
问题 I've implemented an angular 2 app which utilize Kendo UI Grid: I am stuck when deploying app with AoT + Rollup: Error: 'GridModule' is not exported by node_modules\@progress\kendo-angular-grid\dist\npm\js\main.js (imported by app\app.module.js). Tried this from Rollup documentation but I don't understand how to configure namedExports : commonjs({ namedExports: { 'node_modules/@progress/kendo-angular-grid/dist/npm/js/main.js': [ 'GridModule' ] } }); Using above configuration doesn't solve the

Where in the vue code base is it creating the vue.esm.browser.js file?

巧了我就是萌 提交于 2019-12-12 01:25:43
问题 I am looking at vue and trying to figure out how they build the vue.esm.browser.js file. Everything else seems to be in ./script/config.js but I can't find anything in there about esm in the browser. Is it using a dependency or something to generate the file? I also noticed that it isn't listed in the output files when rollup runs. So my question is, where in the Vue code base is it creating the esm.browser file? 来源: https://stackoverflow.com/questions/53983434/where-in-the-vue-code-base-is

gulp rollup not working external resource import

前提是你 提交于 2019-12-11 04:48:59
问题 I'm using gulp-rollup plugin with properly configured babel. Transpiled code from babel needs babel-polyfill to be loaded so I put import "babel-polyfill"; at the top of my main file (babel-polyfill is of course installed). Unfortunatelly, gulp outputted something like this 'babel-polyfill' is imported by src/main.js, but could not be resolved – treating it as an external dependency In rollup call, I used allowRealFiles: true So, rollup is able to touch real file system. Unfortunately, in

Can Rollup & Plugins convert the majority of legacy libraries to es6 modules?

喜欢而已 提交于 2019-12-08 02:27:29
问题 Our team's project is entirely es6 modules (ESM) internally, but has dependencies that have not yet made esm versions. We've created various solutions, but they are definitely not modern, mainstream solutions. By this I mean Rollup workflows which convert legacy formats to esm. Or equivalent. So here's the question: are there now Rollup converters/plugins which can let us bundle all, or at least most, legacy formats into esm? I.e. convert commonJS, iife, umd, amd, (and other) library formats

Prevent rollup from renaming Promise to Promise$1

瘦欲@ 提交于 2019-12-07 07:53:04
问题 Update: Turned out that this is not a problem with Babel, but with Rollup, which is run before. Thanks for your help anyway and sorry for the noise. I use rollup to bundle a number of modules including a Promise polyfill (deliberately overwriting the global Promise). However, rollup recognizes Promise as a global name and transforms export default function Promise(fn) { ... } ... global.Promise = Promise; to function Promise$1(fn) { ... } ... global.Promise = Promise$1; The resulting code

Tree shaking create-react-app?

為{幸葍}努か 提交于 2019-12-06 20:49:28
问题 I created my React app with create-react-app and now use TypeScript with create-react-app-typescript. Everything works ok, but the problem is - especially because I use the good but heavy material-ui - the size of the built bundle is quite big - almost reaching 1MB. How can I use tree shaking tools (like in Webpack 2 or rollup? I don't want to eject already so seems like I don't really have access to the Webpack configuration. I wish it was possible to tree shake a minified code :) Thanks!

Deploying angular 2 app Aot with Rollup and external dependencies

五迷三道 提交于 2019-12-06 11:10:35
I've implemented an angular 2 app which utilize Kendo UI Grid : I am stuck when deploying app with AoT + Rollup: Error: 'GridModule' is not exported by node_modules\@progress\kendo-angular-grid\dist\npm\js\main.js (imported by app\app.module.js). Tried this from Rollup documentation but I don't understand how to configure namedExports : commonjs({ namedExports: { 'node_modules/@progress/kendo-angular-grid/dist/npm/js/main.js': [ 'GridModule' ] } }); Using above configuration doesn't solve the problem. EDIT: finally my working configuration for grid is: namedExports: { '@progress/kendo-angular