philss / static2js-brunch

A Brunch plugin to load static files as strings in Javascript.
2 stars 0 forks source link

Won't load #1

Open scottpham opened 7 years ago

scottpham commented 7 years ago

Hi there, this plugin looks very useful! And it's strange that there's nothing similar in the default plugins. However, this is what I get when I attempt to use with Brunch 2.8.2. Is there something I'm missing?

18 Sep 16:46:41 - warn: Loading of static2js-brunch failed due to Block-scoped decl
arations (let, const, function, class) not yet supported outside strict mode
Stack trace was suppressed. Run with `LOGGY_STACKS=true` to see the trace.
18 Sep 16:46:41 - error: Initialization error -  Cannot read property 'brunchPlugin
Name' of null
philss commented 7 years ago

@scottpham hi Scott! Sorry for the delay.

I tested here with Brunch 2.8.2, and it worked fine. I'm not sure what is going wrong. Can you paste your package.json?

Here is mine (from a brunch new -s es6, with updated brunch version):

{
  "name": "your-app",
  "description": "Description",
  "author": "Your Name",
  "version": "0.0.1",
  "repository": {
    "type": "git",
    "url": ""
  },
  "scripts": {
    "start": "brunch watch --server",
    "prod": "brunch build --production"
  },
  "dependencies": {},
  "devDependencies": {
    "auto-reload-brunch": "^2.0.0",
    "babel-brunch": "~6.0.0",
    "babel-preset-es2015": "~6.3.13",
    "brunch": "^2.8.2",
    "clean-css-brunch": "^2.0.0",
    "css-brunch": "^2.0.0",
    "javascript-brunch": "^2.0.0",
    "static2js-brunch": "github:philss/static2js-brunch",
    "uglify-js-brunch": "^2.0.0"
  }
}