rollupjs

Rollup.js unresolved dependencies

旧时模样 提交于 2020-08-22 11:54:15
问题 I am trying to incorporate rollup.js into a project. Currently I am getting the warnings provided below in the console (unresolved dependencies) and I am not sure why or how to fix it: 'fs' is imported by node_modules\filereader\FileReader.js, but could not be resolved – treating it as an external dependency 'fs' is imported by commonjs-external:fs, but could not be resolved – treating it as an external dependency preferring built-in module 'punycode' over local alternative at 'C:\Users\Ryan

Rollup.js unresolved dependencies

爷,独闯天下 提交于 2020-08-22 11:53:12
问题 I am trying to incorporate rollup.js into a project. Currently I am getting the warnings provided below in the console (unresolved dependencies) and I am not sure why or how to fix it: 'fs' is imported by node_modules\filereader\FileReader.js, but could not be resolved – treating it as an external dependency 'fs' is imported by commonjs-external:fs, but could not be resolved – treating it as an external dependency preferring built-in module 'punycode' over local alternative at 'C:\Users\Ryan

Rollup, Vue and Buble, unexpected token in scss file

試著忘記壹切 提交于 2020-07-10 10:25:11
问题 I am trying to compile SFC with rollup, using Vue and Buble, following the example suplied in the Vue official page. But I keep getting this error: src/wrapper.js → dist/chat.min.js... [!] (plugin buble) SyntaxError: Unexpected token (2:0) src\components\Chat.vue?vue&type=style&index=0&lang.scss (2:0) 1 : 2 : .chat, .chat>*, .chat * { This is my rollup.config.js: import commonjs from '@rollup/plugin-commonjs'; // Convert CommonJS modules to ES6 import vue from 'rollup-plugin-vue'; // Handle

Rollup, Vue and Buble, unexpected token in scss file

懵懂的女人 提交于 2020-07-10 10:23:09
问题 I am trying to compile SFC with rollup, using Vue and Buble, following the example suplied in the Vue official page. But I keep getting this error: src/wrapper.js → dist/chat.min.js... [!] (plugin buble) SyntaxError: Unexpected token (2:0) src\components\Chat.vue?vue&type=style&index=0&lang.scss (2:0) 1 : 2 : .chat, .chat>*, .chat * { This is my rollup.config.js: import commonjs from '@rollup/plugin-commonjs'; // Convert CommonJS modules to ES6 import vue from 'rollup-plugin-vue'; // Handle

Why does copying eval change its behaviour?

喜你入骨 提交于 2020-06-16 03:35:14
问题 According to the rollupjs documentation: Simply 'copying' eval provides you with a function that does exactly the same thing, but which runs in the global scope rather than the local one: var eval2 = eval; (function () { var foo = 42; eval('console.log("with eval:",foo)'); // logs 'with eval: 42' eval2('console.log("with eval2:",foo)'); // throws ReferenceError })(); Can anyone explain exactly how this works? I haven't been able to find anything specific about eval() in the ECMAScript spec.

Use Postcss in Custom Angular Library

China☆狼群 提交于 2020-05-10 14:25:10
问题 I used postcss, postcss-css-modules and posthtml-css-modules to implement CSS Modules in a Angular Application. I also used @angular-builders/custom-webpack to achieved this. Now, I want to do the same with my Custom Angular Library. However, I cannot use @angular-builders/custom-webpack because the Angular Libraries are build using ng-packagr. So, @angular-builders/custom-webpack is not available to use: https://github.com/just-jeb/angular-builders/issues/356 On the other hand, ng-packagr

Error resolving module specifier: react while doing dynamic import from API

时光怂恿深爱的人放手 提交于 2020-04-18 06:09:10
问题 I am trying to dynamically import react component library from API. The js file is fetched succesfully. The babel transpilation has happened successfully too. If I dynamically import the Dummy.js file from localhost like import Dummy from './components/js/Dummy.js' , it works. However API import fails with below error. The same error occurs with react lazy too. I basically want to dynamically load the lib and publish events to it. I am newbie to react and front-end development. Please excuse

Vuetify a la carte: rollup component complains when used in static html file?

核能气质少年 提交于 2020-01-16 08:35:17
问题 I'm trying to rollup a Vue component which uses some vuetify components. For MWE purpose I have a very simple component, CountButton.vue , which is just a wrapper over <v-btn> <template> <div class=""> <v-btn @click="count"> test {{amount}} </v-btn> </div> </template> <script> import {VBtn} from 'vuetify/lib' // <---- for tree shaking & a la carte export default { components: { VBtn }, data: () =>({ amount: 0 }), methods:{ count() { this.amount += 1 } } } </script> I then used rollup to