Giter VIP home page Giter VIP logo

broccoli-rollup's Introduction

broccoli-rollup

Build Status

A broccoli plugin that uses rollup.js on its input.

Usage

Basic

// Brocfile.js
import rollup from 'broccoli-rollup';

export default () =>
  rollup('lib', {
    // nodeModulesPath: string Defaults to process.cwd()
    rollup: {
      input: 'index.js',
      output: {
        file: 'bundle.js',
        format: 'es',
      },
    },
  });

Code Splitting

// Brocfile.js
import rollup from 'broccoli-rollup';

export default () =>
  rollup('lib', {
    // nodeModulesPath: string Defaults to process.cwd()
    rollup: {
      input: 'index.js',
      output: {
        dir: 'chunks',
        format: 'es',
      },
    },
  });

Multiple Output

// Brocfile.js
import rollup from 'broccoli-rollup';

export default () =>
  rollup('lib', {
    // nodeModulesPath: string Defaults to process.cwd()
    rollup: {
      input: 'index.js',
      output: [
        {
          file: 'my-lib.amd.js',
          format: 'amd',
        },
        {
          file: 'my-lib.iife.js',
          name: 'MyLib',
          format: 'iife',
        },
      ],
    },
  });

Notes and Caveats

Broccoli is designed around immutable input and although rollup does expose enough in the build output for us to write it to disk, this doesn't work with the onwrite plugin hook and requires a significant amount of code to get feature parity with rollup's buildOutput.write(outputOptions).

We use the following build flow to achieve compatibility and feature parity with rollup's cli while still adhering to broccoli's immutable input constraints.

  1. sync node.inputPaths[0] to ${node.cachePath}/build
  2. symlink options.nodeModulesPath to ${node.cachePath}/node_modules
  3. change the working directory to ${node.cachePath}/build (rollup doesn't allow this to be passed in and plugins may also the use cwd)
  4. run rollup
  5. restore the working directory
  6. sync ${node.cachePath}/build to node.outputPath for all files that are different from the input.

If you have any plugins that require hard-coded paths into node_modules, please note that node_modules is symlinked above the build path.

So instead of doing node_modules/x you need to do ../node_modules/x.

broccoli-rollup's People

Contributors

ahx avatar asakusuma avatar bekzod avatar bryancrotaz avatar chadhietala avatar dwickern avatar joliss avatar krisselden avatar rwjblue avatar ryanone avatar stefanpenner avatar tomdale avatar topaxi avatar turbo87 avatar villander avatar whastings avatar zackthehuman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

broccoli-rollup's Issues

Seems to be dropping semicolons on deploy builds

Since version 2.14 of Ember data and thus the inclusion of this plugin we are having issues deploying. Local builds work fine.

It seems to simply exclude some semicolons, eg before "exports" here:
i=this.reified[n]={exports:void 0,module:void 0}"exports"===r

Export default function vs class

Hey folks

The direction we are looking to take plugins for Broccoli is that the default export be a function rather than the class definition, such that composing a broccoli pipeline looks like:

import rollup from 'broccoli-rollup';

const js = rollup('app', {
  rollup: {
    input: 'app/index.js',
    output: {
      file: 'app.js',
      format: 'es',
    },
  }
});

I notice that #9 was previously closed, but it looks like @stefanpenner previously made this suggestion.

See broccolijs/broccolijs.github.io#8
https://broccoli.build/plugins.html#example-plugin

v4.1.0 does not handle relative inputs

We just tried to update from v4.0.0 to v4.1.0 and for some reason the new version seems to cause build failures:

ENOENT: no such file or directory, lstat '/tmp/broccoli-1713V9oMBA72T6h/cache-900-broccoli_rollup/build/lib'

=================================================================================

ENV Summary:

  TIME: Thu May 16 2019 20:52:51 GMT+0000 (Coordinated Universal Time)
  TITLE: ember
  ARGV:
  - /usr/local/bin/node
  - /builds/qonto/qonto-js/node_modules/.bin/ember
  - exam
  - --split=8
  - --parallel
  EXEC_PATH: /usr/local/bin/node
  TMPDIR: /tmp
  SHELL: /bin/bash
  PATH:
  - /tmp/yarn--1558039840911-0.3519560502598835
  - /builds/qonto/qonto-js/node_modules/.bin
  - /usr/local/share/.config/yarn/link/node_modules/.bin
  - /builds/qonto/qonto-js/node_modules/.bin
  - /usr/local/share/.config/yarn/link/node_modules/.bin
  - /usr/local/libexec/lib/node_modules/npm/bin/node-gyp-bin
  - /usr/local/lib/node_modules/npm/bin/node-gyp-bin
  - /usr/local/bin/node_modules/npm/bin/node-gyp-bin
  - /usr/local/sbin
  - /usr/local/bin
  - /usr/sbin
  - /usr/bin
  - /sbin
  - /bin
  PLATFORM: linux x64
  FREEMEM: 8970514432
  TOTALMEM: 15768760320
  UPTIME: 373
  LOADAVG: 1.92578125,1.4169921875,0.6416015625
  CPUS:
  - Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz - 2900
  - Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz - 2900
  - Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz - 2900
  - Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz - 2900
  - Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz - 2900
  - Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz - 2900
  - Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz - 2900
  - Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz - 2900
  ENDIANNESS: LE
  VERSIONS:
  - ares: 1.15.0
  - cldr: 33.1
  - http_parser: 2.8.0
  - icu: 62.1
  - modules: 64
  - napi: 3
  - nghttp2: 1.34.0
  - node: 10.15.3
  - openssl: 1.1.0j
  - tz: 2018e
  - unicode: 11.0
  - uv: 1.23.2
  - v8: 6.8.275.32-node.51
  - zlib: 1.2.11

ERROR Summary:

  - broccoliBuilderErrorStack: Error: ENOENT: no such file or directory, lstat '/tmp/broccoli-1713V9oMBA72T6h/cache-900-broccoli_rollup/build/lib'
    at Object.realpathSync (fs.js:1456:7)
    at _walkSync (/builds/qonto/qonto-js/node_modules/broccoli-rollup/node_modules/walk-sync/index.js:101:23)
    at Function.entries (/builds/qonto/qonto-js/node_modules/broccoli-rollup/node_modules/walk-sync/index.js:34:16)
    at Object.treeFromPath (/builds/qonto/qonto-js/node_modules/broccoli-rollup/dist/utils.js:81:37)
    at RollupHelper.syncInput (/builds/qonto/qonto-js/node_modules/broccoli-rollup/dist/rollup-helper.js:36:39)
    at RollupHelper.build (/builds/qonto/qonto-js/node_modules/broccoli-rollup/dist/rollup-helper.js:23:32)
    at BroccoliRollup.build (/builds/qonto/qonto-js/node_modules/broccoli-rollup/dist/index.js:42:32)
    at resolve (/builds/qonto/qonto-js/node_modules/broccoli/lib/wrappers/transform-node.js:29:35)
    at new Promise (<anonymous>:null:null)
    at TransformNodeWrapper.build (/builds/qonto/qonto-js/node_modules/broccoli/lib/wrappers/transform-node.js:21:12)
    at Promise.resolve.then.then.then (/builds/qonto/qonto-js/node_modules/broccoli/lib/builder.js:116:28)
    at process._tickCallback (internal/process/next_tick.js:68:7)

  - code: [undefined]
  - codeFrame: ENOENT: no such file or directory, lstat '/tmp/broccoli-1713V9oMBA72T6h/cache-900-broccoli_rollup/build/lib'
  - errorMessage: ENOENT: no such file or directory, lstat '/tmp/broccoli-1713V9oMBA72T6h/cache-900-broccoli_rollup/build/lib'
        at BroccoliRollup
-~- created here: -~-
    at new Plugin (/builds/qonto/qonto-js/node_modules/broccoli-rollup/node_modules/broccoli-plugin/index.js:30:32)
    at new BroccoliRollup (/builds/qonto/qonto-js/node_modules/broccoli-rollup/dist/index.js:14:9)
    at module.exports (/builds/qonto/qonto-js/ember-cli-build.js:67:23)
    at Builder.readBuildFile (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/builder.js:51:14)
    at Builder.setupBroccoliBuilder (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/builder.js:65:22)
    at new Builder (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/builder.js:31:10)
    at BuildTask.run (/builds/qonto/qonto-js/node_modules/ember-cli/lib/tasks/build.js:15:19)
    at Promise.resolve.then (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/command.js:239:24)
    at tryCatcher (/builds/qonto/qonto-js/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:323:19)
    at invokeCallback (/builds/qonto/qonto-js/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:495:31)
    at /builds/qonto/qonto-js/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:559:14
    at flush (/builds/qonto/qonto-js/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:2402:5)
    at process._tickCallback (internal/process/next_tick.js:61:11)
    at Function.Module.runMain (internal/modules/cjs/loader.js:757:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

-~- (end) -~-
  - errorType: Build Error
  - location:
    - column: [undefined]
    - file: [undefined]
    - line: [undefined]
    - treeDir: [undefined]
  - message: ENOENT: no such file or directory, lstat '/tmp/broccoli-1713V9oMBA72T6h/cache-900-broccoli_rollup/build/lib'
        at BroccoliRollup
-~- created here: -~-
    at new Plugin (/builds/qonto/qonto-js/node_modules/broccoli-rollup/node_modules/broccoli-plugin/index.js:30:32)
    at new BroccoliRollup (/builds/qonto/qonto-js/node_modules/broccoli-rollup/dist/index.js:14:9)
    at module.exports (/builds/qonto/qonto-js/ember-cli-build.js:67:23)
    at Builder.readBuildFile (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/builder.js:51:14)
    at Builder.setupBroccoliBuilder (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/builder.js:65:22)
    at new Builder (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/builder.js:31:10)
    at BuildTask.run (/builds/qonto/qonto-js/node_modules/ember-cli/lib/tasks/build.js:15:19)
    at Promise.resolve.then (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/command.js:239:24)
    at tryCatcher (/builds/qonto/qonto-js/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:323:19)
    at invokeCallback (/builds/qonto/qonto-js/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:495:31)
    at /builds/qonto/qonto-js/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:559:14
    at flush (/builds/qonto/qonto-js/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:2402:5)
    at process._tickCallback (internal/process/next_tick.js:61:11)
    at Function.Module.runMain (internal/modules/cjs/loader.js:757:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

-~- (end) -~-
  - name: BuildError
  - nodeAnnotation: [undefined]
  - nodeName: BroccoliRollup
  - originalErrorMessage: ENOENT: no such file or directory, lstat '/tmp/broccoli-1713V9oMBA72T6h/cache-900-broccoli_rollup/build/lib'
  - stack: Error: ENOENT: no such file or directory, lstat '/tmp/broccoli-1713V9oMBA72T6h/cache-900-broccoli_rollup/build/lib'
    at Object.realpathSync (fs.js:1456:7)
    at _walkSync (/builds/qonto/qonto-js/node_modules/broccoli-rollup/node_modules/walk-sync/index.js:101:23)
    at Function.entries (/builds/qonto/qonto-js/node_modules/broccoli-rollup/node_modules/walk-sync/index.js:34:16)
    at Object.treeFromPath (/builds/qonto/qonto-js/node_modules/broccoli-rollup/dist/utils.js:81:37)
    at RollupHelper.syncInput (/builds/qonto/qonto-js/node_modules/broccoli-rollup/dist/rollup-helper.js:36:39)
    at RollupHelper.build (/builds/qonto/qonto-js/node_modules/broccoli-rollup/dist/rollup-helper.js:23:32)
    at BroccoliRollup.build (/builds/qonto/qonto-js/node_modules/broccoli-rollup/dist/index.js:42:32)
    at resolve (/builds/qonto/qonto-js/node_modules/broccoli/lib/wrappers/transform-node.js:29:35)
    at new Promise (<anonymous>:null:null)
    at TransformNodeWrapper.build (/builds/qonto/qonto-js/node_modules/broccoli/lib/wrappers/transform-node.js:21:12)
    at Promise.resolve.then.then.then (/builds/qonto/qonto-js/node_modules/broccoli/lib/builder.js:116:28)
    at process._tickCallback (internal/process/next_tick.js:68:7)

We use it roughly like this:

  let fooTree = new Rollup('lib', {
    rollup: {
      input: 'foo.js',
      output: {
        file: 'assets/foo.js',
        format: 'iife',
      },
      plugins: [resolve(), commonjs()],
    },
  });

v4.1.0 should ignore watchedFiles that don't exist

So we check input files against rollupBuild.watchedFiles which is every resolved dependency (return value from plugin.resolve(id, dep)). Normally this is the absolute path to the dependency file but some plugins resolve ids that aren't real files. Typically these id.startsWith('\0') but rollup --watch just ignores watched files that error with ENOENT so likely we should just do the same.

Fails with "must implement .build() function"

Using "broccoli-rollup": "^1.0.3",

import Rollup from 'broccoli-rollup';
...
// bundle = es6->es5 (this works)
// now the bit that doesn't
bundle = new Rollup([bundle], {
	rollup: {
		entry: 'index.js',
		dest: 'index.js'
	}
});
Build failed.

Error: Plugin subclasses must implement a .build() function
  at Plugin.build (C:\projects\sc-pp\sc-pp-backend\node_modules\broccoli-plugin\index.js:101:9)
  at C:\projects\sc-pp\sc-pp-backend\node_modules\broccoli-plugin\read_compat.js:61:34
  at tryCatch (C:\projects\sc-pp\sc-pp-backend\node_modules\rsvp\dist\rsvp.js:538:12)
  at invokeCallback (C:\projects\sc-pp\sc-pp-backend\node_modules\rsvp\dist\rsvp.js:553:13)
  at publish (C:\projects\sc-pp\sc-pp-backend\node_modules\rsvp\dist\rsvp.js:521:7)
  at flush (C:\projects\sc-pp\sc-pp-backend\node_modules\rsvp\dist\rsvp.js:2373:5)
  at nextTickCallbackWith0Args (node.js:420:9)
  at process._tickCallback (node.js:349:13)

disable cycle warning by default

Circular dependency: ../../../../../var/folders/4r/whc65vwj1xggvvky3yy1cp9m000mw4/T/broccoli-67394EUBquvxT4wrc/cache-017-rollup_rsvp_js/build/rsvp/then.js -> ../../../../../var/folders/4r/whc65vwj1xggvvky3yy1cp9m000mw4/T/broccoli-67394EUBquvxT4wrc/cache-017-rollup_rsvp_js/build/rsvp/-internal.js -> ../../../../../var/folders/4r/whc65vwj1xggvvky3yy1cp9m000mw4/T/broccoli-67394EUBquvxT4wrc/cache-017-rollup_rsvp_js/build/rsvp/then.js

rollup doing this is just annoying, we can likely do emberjs/data#5839 here.

can't access the promise returned by rollup

since rollup executions happen asynchronously, I'm not sure how to handle its results inside a brocfile. is not being able to access promise returned by rollup the wanted behaviour in this case?

Update to rollup v2

Would be cool to get the rollup dependency updated to latest. Now you have to downgrade plugin to old versions that still support 1.x.

Error if processing a lib that has a node_modules directory

The following section:

broccoli-rollup/index.ts

Lines 82 to 85 in 74f8d07

if (!linkedModules) {
symlinkOrCopySync(this.nodeModulesPath, `${this.cachePath}/node_modules`);
this.linkedModules = true;
}

Creates the node_modules directory.

However if a library that this plugin is processing includes a node_modules directory already as part of the tree this fails:

broccoli-rollup/index.ts

Lines 94 to 96 in 74f8d07

case 'mkdir':
mkdirSync(`${this.cachePath}/${relativePath}`);
break;

Is there a way to guard this?

rollup-plugin-typescript Unexpected token

Adding rollup-plugin-typescript results on:

Unexpected token (Note that you need plugins to import files that are not JavaScript)
        at BroccoliRollup
-~- created here: -~-
    at new Plugin (/Users/gsilvae/code/broccoli-rollup-typescript/node_modules/broccoli-plugin/index.js:31:32)
    at new BroccoliRollup (/Users/gsilvae/code/broccoli-rollup-typescript/node_modules/broccoli-rollup/dist/index.js:15:9)
    at rollup (/Users/gsilvae/code/broccoli-rollup-typescript/node_modules/broccoli-rollup/dist/index.js:10:12)
    at Object.apply (/Users/gsilvae/code/broccoli-rollup-typescript/node_modules/broccoli-rollup/index.js:9:20)
    at default (/Users/gsilvae/code/broccoli-rollup-typescript/Brocfile.js:10:10)
    at getBuilder (/Users/gsilvae/code/broccoli-rollup-typescript/node_modules/broccoli/lib/cli.js:174:31)
    at Command.module.exports.program.command.alias.description.option.option.option.option.option.option.option.option.action (/Users/gsilvae/code/broccoli-rollup-typescript/node_modules/broccoli/lib/cli.js:123:23)
    at Command.listener (/Users/gsilvae/code/broccoli-rollup-typescript/node_modules/commander/index.js:315:8)
    at emitTwo (events.js:126:13)
    at Command.emit (events.js:214:7)
-~- (end) -~-

Running Rollup alone, with the same config, works fine.

Repo with test case:
https://github.com/givanse/broccoli-rollup-typescript-test-case

rollup-plugin-scss not working

I'm using the rollup-plugin-scss and it is not working. I dug a bit into the code and I found that the issue is related to 2 things:

  • The filter created with the rollup utils is returning false for the broccoli paths, and
  • somehow, the writeFile method is being called but its callback is not. An empty file is being created.

PS. It is working using directly rollup.
my setup for broccoli

const sass = require('rollup-plugin-scss')
const Rollup = require('broccoli-rollup')
let js = new Rollup('app', {
  rollup: {
    input: 'app.js',
    output: {
      file: 'app.js',
      format: 'cjs'
    },
    plugins: [
      sass()
    ]
  }
})

my setup for rollup only

import sass from 'rollup-plugin-scss';

export default {
  input: 'app/app.js',
  output: {
    file: 'bundle.js',
    format: 'cjs',
  },
  plugins: [
    sass()
  ]
}

Rollup ^1.0.0

What needs to be done before 3.0.0 can be released?

Rollup 0.57 is currently used and this fails in node 8 and later, and runs out of memory in node 6.

I also need multiple entry points which rollup 1 supports.

How can I help get the 3.0.0 release ready for publishing?

npm module 2.1 contains tmp files

Seems that module published to npm under the version 2.1 contains some tmp files.
Inside it contains some invalid symlinks which fail one of static tests in our project. Example:

broccoli-rollup/tmp/rollup-input_base_path-6obEeBLr.tmp/0@ -> Users/kselden/src/krisselden/broccoli-rollup/tmp/fixture-input

Doesn't seem work with rollup-plugin-commonjs

Hi

I'm trying to bundle an app with npm modules, for this I included the rollup-plugin-commonjs. It seems that because of the temporary folder of broccoli it wont find the modules relative to the node module.

Example:

app/app.js:

import P2 from 'p2'

Brocfile.js:

module.exports = new Rollup('.', {
  entry: 'app/app.js',
  dest: 'app/app.js',
  format: 'iife',
  plugins: [
    commonjs({
      include: 'node_modules/**'
    }),
    json(),
    nodeResolve({
      jsnext: true,
      browser: true,
      preferBuiltins: false
    })
  }
})

Will include the p2.js file but not the subsequent files required by p2.js.

Using the same configuration on the command-line with rollup -c builts the expected output.

After some debugging I found out, that rollup-plugin-commonjs tries to match /home/topaxi/my-project/tmp/rollup-input_base_path-HNZeqlFn.tmp/0/node_modules/p2/src/p2.js against /home/topaxi/my-project/node_modules which obviously won't match.

Should this be supported? Or should I abandon this and just use a broccoli-funnel filter to move the module files to be found by rollup?

Update Rollup dependency?

broccoli-rollup depends on rollup ^0.51.6, but the latest version is 0.56.3.

I tried to upgrade it like so:

diff --git package.json package.json
index a517050..a155671 100644
--- package.json
+++ package.json
@@ -48,13 +48,12 @@
   },
   "dependencies": {
     "@types/node": "^8.0.53",
-    "@types/rollup": "^0.51.0",
     "broccoli-plugin": "^1.2.1",
     "fs-tree-diff": "^0.5.2",
     "heimdalljs": "^0.2.1",
     "heimdalljs-logger": "^0.1.7",
     "node-modules-path": "^1.0.1",
-    "rollup": "^0.51.6",
+    "rollup": "^0.56.3",
     "symlink-or-copy": "^1.1.8",
     "walk-sync": "^0.3.1"
   }

(@types/rollup apparently is no longer needed, as rollup now ships with type definitions.)

However, I'm getting the following error:

> rm -rf dist && tsc

index.ts(13,10): error TS2305: Module '"/home/ubuntu/src/broccoli-rollup/node_modules/rollup/dist/typings/node-entry"' has no exported member 'Bundle'.
index.ts(13,18): error TS2305: Module '"/home/ubuntu/src/broccoli-rollup/node_modules/rollup/dist/typings/node-entry"' has no exported member 'ConfigFileOptions'.
index.ts(13,37): error TS2305: Module '"/home/ubuntu/src/broccoli-rollup/node_modules/rollup/dist/typings/node-entry"' has no exported member 'GenerateOptions'.
index.ts(13,54): error TS2305: Module '"/home/ubuntu/src/broccoli-rollup/node_modules/rollup/dist/typings/node-entry"' has no exported member 'SourceMap'.
index.ts(13,65): error TS2305: Module '"/home/ubuntu/src/broccoli-rollup/node_modules/rollup/dist/typings/node-entry"' has no exported member 'WriteOptions'.
node_modules/rollup/dist/typings/Graph.d.ts(1,23): error TS2688: Cannot find type definition file for 'acorn'.
node_modules/rollup/dist/typings/Graph.d.ts(2,24): error TS2307: Cannot find module 'acorn'.
node_modules/rollup/dist/typings/Module.d.ts(1,23): error TS2688: Cannot find type definition file for 'acorn'.
node_modules/rollup/dist/typings/Module.d.ts(2,41): error TS2307: Cannot find module 'acorn'.
node_modules/rollup/dist/typings/Module.d.ts(3,25): error TS2307: Cannot find module 'magic-string'.
node_modules/rollup/dist/typings/Module.d.ts(7,30): error TS7016: Could not find a declaration file for module 'source-map'. '/home/ubuntu/src/broccoli-rollup/node_modules/source-map/source-map.js' implicitly has an 'any' type.
  Try `npm install @types/source-map` if it exists or add a new declaration (.d.ts) file containing `declare module 'source-map';`
node_modules/rollup/dist/typings/ast/nodes/BlockStatement.d.ts(3,25): error TS2307: Cannot find module 'magic-string'.
node_modules/rollup/dist/typings/ast/nodes/ClassDeclaration.d.ts(4,25): error TS2307: Cannot find module 'magic-string'.
node_modules/rollup/dist/typings/ast/nodes/ExportDefaultDeclaration.d.ts(5,25): error TS2307: Cannot find module 'magic-string'.
node_modules/rollup/dist/typings/ast/nodes/Identifier.d.ts(6,25): error TS2307: Cannot find module 'magic-string'.
node_modules/rollup/dist/typings/ast/nodes/Import.d.ts(4,25): error TS2307: Cannot find module 'magic-string'.
node_modules/rollup/dist/typings/ast/nodes/Program.d.ts(1,25): error TS2307: Cannot find module 'magic-string'.
node_modules/rollup/dist/typings/ast/nodes/Property.d.ts(5,25): error TS2307: Cannot find module 'magic-string'.
node_modules/rollup/dist/typings/ast/nodes/TemplateLiteral.d.ts(2,25): error TS2307: Cannot find module 'magic-string'.
node_modules/rollup/dist/typings/ast/nodes/shared/Node.d.ts(4,25): error TS2307: Cannot find module 'magic-string'.
node_modules/rollup/dist/typings/rollup/index.d.ts(3,30): error TS7016: Could not find a declaration file for module 'source-map'. '/home/ubuntu/src/broccoli-rollup/node_modules/source-map/source-map.js' implicitly has an 'any' type.
  Try `npm install @types/source-map` if it exists or add a new declaration (.d.ts) file containing `declare module 'source-map';`
node_modules/rollup/dist/typings/rollup/index.d.ts(6,27): error TS2307: Cannot find module 'magic-string'.
node_modules/rollup/dist/typings/utils/transform.d.ts(1,23): error TS2688: Cannot find type definition file for 'acorn'.
node_modules/rollup/dist/typings/utils/transform.d.ts(2,24): error TS2307: Cannot find module 'acorn'.
node_modules/rollup/dist/typings/utils/transform.d.ts(5,30): error TS7016: Could not find a declaration file for module 'source-map'. '/home/ubuntu/src/broccoli-rollup/node_modules/source-map/source-map.js' implicitly has an 'any' type.
  Try `npm install @types/source-map` if it exists or add a new declaration (.d.ts) file containing `declare module 'source-map';`
node_modules/rollup/dist/typings/watch/index.d.ts(4,30): error TS7016: Could not find a declaration file for module 'chokidar'. '/home/ubuntu/src/broccoli-rollup/node_modules/chokidar/index.js' implicitly has an 'any' type.
  Try `npm install @types/chokidar` if it exists or add a new declaration (.d.ts) file containing `declare module 'chokidar';`

I tried fixing some of these issues – for example, Bundle seems to have been renamed to OutputChunk – but I got stuck eventually.

rollup-plugin-string don't work

case:

I'm in migration process from rollup only build pipeline to broccoli pipeline.
I need to keep templates in independent files and import it as variable from js.

trying to setup pipeline using https://github.com/TrySound/rollup-plugin-string and broccoli-rollup - but, it's not working at all (

Priginal rollup pipeline works with this plugin without isssues.

commons and noderesolve broken when used with mergeTrees

Today I noticed that my project won't build anymore. The problem was that a commonjs module installed with npm couldn't be resolved anymore. The problem seemed to be some mismatch of subdependencies. So I've upgraded all my dependencies the problem still remained.

I then put together this little test project which does nothing but imports 2 external dependencies and a local file with babel but uses (only to demonstrate) a mergeTrees result instead of a simple string. The project fails to build with this because it cannot resolve the node-resolve dependencies. Without mergeTrees, i.e. with new Rollup("lib", .....) instead the project builds properly and the built file contains the expected output.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.