Coder Social home page Coder Social logo

egoist / vuepack Goto Github PK

View Code? Open in Web Editor NEW
2.4K 2.4K 203.0 247 KB

:package: A modern starter which uses Vue 2, Vuex, Vue-router and Webpack 2 (and even Electron)

Home Page: http://vuepack.surge.sh

License: MIT License

HTML 1.17% JavaScript 88.41% Vue 7.64% CSS 2.78%

vuepack's Introduction

vuepack

VuePack is a modern Vue.js starter
which uses Vue 2, Vuex, Vue-router and Webpack 2.

Note

I highly recommend you to try Poi, you can develop Vue.js app with no-config until you need it. Less boilerplate code, more happiness ❤️

Here's the plan for VuePack 4.0, you can support my work by donating or joining the development.

Features

Check out the docs for more usages.

Get Started

You'd better have node >=10 and npm >=6 installed:

sao

This template can be used with SAO, which also means you can use the template offline:

npm i -g sao jstransformer-handlebars
# from npm
sao vuepack new-project
# or git repo
sao egoist/vuepack new-project

Vue CLI

Vue CLI (vue-cli@2 or @vue/cli@>=3 + @vue/cli-init) is still supported, but it has been deprecated by Vue officially, so it is not recommended to use Vue CLI with Vuepack.

npm i -g @vue/cli @vue/cli-init
vue init egoist/vuepack

For Windows users

Install git with unix tools before getting started.

Folder Structure

If you did not enable Electron support, the dest folder is ./dist, otherwise it's ./app/dist.

./app folder only exists when you enabled Electron support.

├── app             # the actual app you want to bundle with Electron
│    ├── dist       # directory which contains all bundled files
│    └── index.js   # entry file for Electron
├── build           # webpack configs and other scripts
├── client          # client-side app files
├── dist            # bundled files and index.html
│    ├── index.html
│    └── [...other bundled files]  
├── tests           # e2e tests written by testcafe 
├── node_modules    # dependencies
└── package.json    # package info

Custom template

You want to customize the output of index.html, simply modify index.html, see more at html-webpack-plugin.

License

MIT © EGOIST

vuepack's People

Contributors

egoist avatar ephasme avatar kristianmandrup avatar ljmerza avatar miherlosev avatar mplewis avatar phenomeno avatar sschadwick avatar vitre avatar xng avatar zigomir 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vuepack's Issues

找不到 babel-core

npm run dev的时候,找不到这个babel-core.

image

安装 npm install babel-core --save后,正常,但是还有问题.

npm run build的时候,出现这样的错误. node v6
image

npm run dev error

when I run npm run dev, the terminal throw the error message below:

WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration has an unknown property 'vue'. These properties are valid:
   object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry, externals?, loader?, module?, name?, node?, output?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }
   For typos: please correct them.
   For loader options: webpack 2 no longer allows custom properties in configuration.
     Loaders should be updated to allow passing options via loader options in module.rules.
     Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:
     plugins: {
       new webpack.LoaderOptionsPlugin({
         // test: /\.xxx$/, // may apply this only for some modules
         options: {
           vue: ...
         }
       })
     }

Are there anything wrong with my operation?

Thanks a lot!

Running into issues with the router and using an external component for the nav

Full source here.

I am receiving the following error by having my navigation menu as an external component:

[Vue warn]: Failed to resolve directive: link (found in anonymous component - use the "name" option for better debugging messages.))

Now after a bit of googling I think it is related to this.

Which is something to do with the component being external.

App.vue:

<template>
  <div id="app">
    <div class="container">
      <navigation></navigation>
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
import Navigation from './components/Navigation'

export default {
  components: {
    Navigation,
  }
}
</script>

Navigation.vue:

<template>
  <div class="navigation">
    <div class="grid -middle">
      <div class="cell -3of12">
        <h1>Otis Wright</h1>
      </div>
      <div class="cell -9of12">
        <ul class="menu">
          <li>
            <a v-link="{ path: 'home' }">Home</a>
          </li>
          <li>
            <a v-link="{ path: '/projects' }">Projects</a>
          </li>
          <li>
            <a href="#">Experiments</a>
          </li>
          <li>
            <a href="#">Contact</a>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

But after looking at the routes I can not figure out what is going wrong?

index.js:

import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  mode: 'hash',
  routes: [
    {
      path: '/',
      component: require('../views/Home')
    },
    {
      path: '/projects',
      component: require('../views/Projects')
    }
  ]
})

Sorry still learning Vue and I am probably missing something really simple, the routes are being handled slightly differently to what I am used to so I can't quite figure it out.

[Vue warn]: Failed to resolve directive: link (found in anonymous component - use the "name" option for better debugging messages.)

/* index.js********/
var Vue = require('vue/dist/vue.js');
//import Vue from 'vue/dist/vue.js'
var VueRouter = require('vue-route');

Vue.use(VueRouter);
var CHATBOX = require('./compnent/chatbox/chatbox.vue');
var ADDROOMS = require('./compnent/rooms/add_rooms.vue');
var ALLROOMS = require('./compnent/rooms/all_rooms.vue');
var MYROOMS = require('./compnent/rooms/my_rooms.vue');
new Vue ({
el:"#app-layout",
data: function () {
return{
msg:"hello",
}
}
});
var App = Vue.extend({});
let router = new VueRouter();
router.map({
'/addrooms': {
component: ADDROOMS
},
'/allrooms': {
component: ALLROOMS
},
'/myrooms': {
component: MYROOMS
},
'/chatbox': {
component: CHATBOX
},
});
/*******home.blade . php ***/

....... @{{ msg }}
</div>

/******* add_rooms.vue/

            <input type="text" name="name" class="form-control" v-model="room_name">

            <input type="submit" @click="addRoom()" name="" value="add room">

  >   
</div>
<script> import loading from 'vue-loading'; import MessageBox from 'vue-msgbox'; export default{ directives: { loading }, data: function (){ return{ room_name:"", isLoading:false, } }, methods:{ addRoom: function (){ this.isLoading = true ; MessageBox("Good job!", "You clicked the button!", "success");// title, message, type } } } </script>

/*********_package.jsnom_/
{
"private": true,
"scripts": {
"prod": "gulp --production",
"dev": "gulp watch"
},
"devDependencies": {
"babel-core": "^6.18.0",
"babel-preset-es2015": "^6.18.0",
"bootstrap-sass": "^3.0.0",
"browserify": "^13.1.1",
"gulp": "^3.9.1",
"laravel-elixir": "^5.0.0",
"laravel-elixir-vue-2": "^0.2.0",
"laravel-elixir-vueify": "^2.0.0",
"vue": "^2.0.3",
"vue-loading": "^0.1.4",
"vue-msgbox": "^2.0.1",
"vue-resource": "^1.0.3",
"vue-route": "^1.5.1",
"vueify": "^9.2.4"
},
"dependencies": {
"vue-msgbox": "^2.0.1"
}
}

Splitting vendor chunk

Hello, this issue is question.

Why do we split bundle into "vendor" and "client" files?
And then, why did you decided to switch from Object.keys(pkg.dependencies) to manually defining this vendor packages in config.js ?

thanks.

What is the build process now on master.

So far I:

  • git clone https://github.com/egoist/vuepack.git
  • cd vuepack/template
  • npm install

This results in the following error:

npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.4.0
npm ERR! npm  v3.10.3
npm ERR! file /home/otis/Developer/portfolio/template/package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! Unexpected token '#' at 23:7
npm ERR!     {{#jsx}}
npm ERR!       ^
npm ERR! File: /home/otis/Developer/portfolio/template/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR! 
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! Please include the following file with any support request:
npm ERR!     /home/otis/Developer/portfolio/template/npm-debug.log

The offending line is easy enough to find: {{#jsx}}

Just wondering how you are handling this locally, as a side note I do not want to use jsx.

Sorry know it is a pre-release hoping I can submit a PR for the README once I have a clearer idea of what is going on.

Cheers,
Otis.

npm install fails

npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants webpack@1 || ^2.1.0-beta
npm ERR! peerinvalid Peer [email protected] wants webpack@^2.1.0-beta.19
npm ERR! peerinvalid Peer [email protected] wants webpack@1 || ^2.1.0-beta
npm ERR! peerinvalid Peer [email protected] wants webpack@^1.3.0 || ^2.1.0-beta
npm ERR! peerinvalid Peer [email protected] wants webpack@*

File loader doesn't work?

Hi, loading static files does not seem to work for me.
I am not sure If I am using it correctly. Example:

// App.vue
<div id="app" style="background-image: url('../imgs/bg.jpg')">

and I create folder imgs in client and put bg.jpg here.
Webpack dev server does return index.html for this path and production build does not include these files.

Am I missing something? Thanks.

CSS support?

Hi there! Awesome stuff with vuepack (vue 2). Already used it to push something to production.

On this new project I have to use regular .css files.

But when I place 'app.css' inside 'client/styles/app.css'

Webpack does not process them.

I've been comparing the webpack config files to another webpack files but I can not figure it out.

Please advice, thank you! I'm learning webpack so I'm really stump.

error: EACCES: permission denied

error: EACCES: permission denied, open '/Users/yang/.config/configstore/update-notifier-vuepack.json'
You don't have access to this file.

Hot Module Replacement doesn't work.

[HMR] The following modules couldn't be hot updated: (Full reload needed)
This is usually because the modules which have changed (and their parents) do not know how to hot reload themselves. See http://webpack.github.io/docs/hot-module-replacement-with-webpack.html for more details.
[HMR]  - ./client/views/Home/index.js

It seems module.hot.accept() should be added to somewhere on parent. I'm not a webpack expert.

Using vuepack with Socket.io

Is it possible to integrate this with something like socket.io? Is there anything special I'd need to do with webpack-dev-server?

Latest [email protected] breaks the project

Reverting to beta.20 works.

WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration has an unknown property 'vue'. These properties are valid:
   object { amd?, bail?, cache?, context?, devServer?, devtool?, entry, externals?, loader?, module?, name?, dependencies?, node?, output?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }
 - configuration.resolve.extensions[0] should not be empty.

History mode messed up build.

When setting vue-router's mode to 'history' instead of the default 'hash' the build seems to break.
Dev server works perfectly.

Cannot link directly to nested/sub routes

For example, accessing "test.com/foo" directly from the address bar works fine, however "test.com/foo/bar" does not load and throws a JS and CSS error.

I found the problem to be in the build/webpack.base.js file.

  output: {
    path: _.outputPath,
    filename: '[name].js',
    publicPath: './',
    filename: 'build.js'
  },

Should have the publicPath changed from publicPath: './', to publicPath: '/',

Works as expected once that is fixed.

env: node\r: No such file or directory

Installed following instructions:

$ npm install -g vuepack
/usr/local/bin/vue -> /usr/local/lib/node_modules/vuepack/bin/vuepack
/usr/local/lib
└── [email protected]

Looks all fine right? But apparently somethings is not.

$ vue init hello-vue
env: node\r: No such file or directory

$ vue --version
env: node\r: No such file or directory

$ vue --help
env: node\r: No such file or directory

Any idea's? Seems more people are struggling with this..

$ node --version
v5.0.0

$ which node
/usr/local/bin/node

$ npm --version
3.3.12

$ which npm
/usr/local/bin/npm

vue-cli template

Hi,

vuepack seems nice! Why not pack it inside template directory so one can use it with vue-cli? I'm just curios is this is by design or you'd accept vue-cli compatibility PR?

SyntaxError: Unexpected token ILLEGAL

I'm getting this error when I try to run any command with vue:

vue -h
/usr/local/lib/node_modules/vuepack/bin/vuepack:10
  console.log(`${pkg.name.magenta} ~ ${pkg.version.cyan}`)
              ^
SyntaxError: Unexpected token ILLEGAL
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

Thanks in advance for help with this.

Update packages & remove precss dependency

Hi,
as we previously discuted, it seems like you have removed precss from boilerplate, however you forgot about dependency in package.json.

Also, please update dependencies (mostly vue related) to last versions.

Thanks.

Add vendor css and js in webpack

Hey,
I managed to add a vendor.js file in the stack like this:

  1. inside webpack.config.js:

    • entry become:
    entry: {
        app:    ['./src/main.js'],
        vendor: ['sweetalert', 'jquery']
      }
    
    • add this in the plugin list:

    new webpack.optimize.CommonsChunkPlugin("vendor", "vendor.js", Infinity),

  2. inside webpack.config.dev.js:
    config.entry.push('webpack-hot-middleware/client')
    become this:
    config.entry.app.push('webpack-hot-middleware/client')

My problem is: how to achieve the same with my css vendor files from the node_modules directory?

能不能开一个SSR-branch

基于vuepack全面换了Vue 2.0+套装之后的版本写了一个vue-ssr版本的template, 稍微调整了下工作流, up能不能开个ssr的分支让我pr一下?

Dev mode is broken for electron

Hello! Selecting electron and running the dev script runs the server but when i try to load the project i get a

Cannot GET /

Port listening

You have the port hardcoded, it should be a variable and the message in the log " console.log('Listening at http://localhost:3030')
" should reflect that 😄

Why deps are in dev deps?

Just a question, why are dependencies that are not dev dependencies in devDependencies?
I am talking about vue, moment...

Error on server up (windows)

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dev:win' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev:win', 'dev:win', 'postdev:win' ]
5 info lifecycle [email protected]~predev:win: [email protected]
6 silly lifecycle [email protected]~predev:win: no script for predev:win, continuing
7 info lifecycle [email protected]~dev:win: [email protected]
8 verbose lifecycle [email protected]~dev:win: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~dev:win: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;c:\laragon\www\hello-vue\node_modules\.bin;C:\laragon\bin\cmder\bin;C:\Program Files\Git\bin;C:\Program Files\Git\share\vim\vim74;C:\laragon\bin\cmder\vendor\conemu-maximus5;C:\laragon\bin\cmder\vendor\conemu-maximus5\ConEmu;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Users\Muniz\AppData\Roaming\npm\node_modules\dploy\bin;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\Heroku\bin;C:\Program Files (x86)\git\cmd;C:\Program Files\MongoDB\Server\3.0\bin;C:\Program Files\nodejs\;C:\Users\Muniz\AppData\Roaming\npm;C:\laragon\bin\cmder;C:\laragon\bin\mysql\mariadb-10.0.20\bin;C:\laragon\bin\php\php-5.6.13;C:\laragon\bin\composer;C:\laragon\bin\apache\apache-2.4.16\bin\;C:\laragon\bin\redis\redis-2.8.17;C:\laragon\bin\memcached\memcached-1.4.5;C:\laragon\bin\nodejs;C:\laragon\bin\notepad++;C:\laragon\bin\sendmail;C:\laragon\bin\winscp;C:\laragon\bin\putty;;C:\laragon\bin\cmder\vendor\dtelnet;C:\laragon\bin\cmder\vendor\putty;C:\Users\Muniz\AppData\Roaming\Composer\vendor\bin;C:\Users\Muniz\AppData\Roaming\npm
10 verbose lifecycle [email protected]~dev:win: CWD: c:\laragon\www\hello-vue
11 silly lifecycle [email protected]~dev:win: Args: [ '/d /s /c',
11 silly lifecycle   'set NODE_ENV=development && set HOT=1 && set VUEPACK_PORT=3030 && node scripts/devServer.js' ]
12 silly lifecycle [email protected]~dev:win: Returned: code: 3221225501  signal: null
13 info lifecycle [email protected]~dev:win: Failed to exec dev:win script
14 verbose stack Error: [email protected] dev:win: `set NODE_ENV=development && set HOT=1 && set VUEPACK_PORT=3030 && node scripts/devServer.js`
14 verbose stack Exit status 3221225501
14 verbose stack     at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:232:16)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at EventEmitter.emit (events.js:172:7)
14 verbose stack     at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at ChildProcess.emit (events.js:172:7)
14 verbose stack     at maybeClose (internal/child_process.js:818:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid [email protected]
16 verbose cwd c:\laragon\www\hello-vue
17 error Windows_NT 6.1.7600
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev:win"
19 error node v5.1.1
20 error npm  v3.3.12
21 error code ELIFECYCLE
22 error [email protected] dev:win: `set NODE_ENV=development && set HOT=1 && set VUEPACK_PORT=3030 && node scripts/devServer.js`
22 error Exit status 3221225501
23 error Failed at the [email protected] dev:win script 'set NODE_ENV=development && set HOT=1 && set VUEPACK_PORT=3030 && node scripts/devServer.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the vuepack package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     set NODE_ENV=development && set HOT=1 && set VUEPACK_PORT=3030 && node scripts/devServer.js
23 error You can get their info via:
23 error     npm owner ls vuepack
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

Upgrade to vue2

  "dependencies": {
    "vue": "^2.0.0",
    "vue-router": "^2.0.0",
    "vuex": "^2.0.0",
    "vuex-router-sync": "^3.0.0"
  },

Also latest webpack is now: "webpack": "2.1.0-beta.25"

Errors in app.js client

Upon generating a new project, I get three errors in the ./client/app.js file:

Regarding

const app = new Vue({ router, store, ...App })

The follow errors:
Property assignment expected
"," expected
Declaration or statement expected

There are also quite a few errors showing up in ./client/components/App/style.css

npm run dev报错 没找到原因

ERROR in ./src/main.js
Module build failed: ReferenceError: Unknown plugin "transform-runtime" specified in "/Users/kevinli/Documents/.babelrc" at 0, attempted to resolve relative to "/Users/kevinli/Documents"
    at /Users/kevinli/Documents/project/vuepack/node_modules/.npminstall/babel-core/6.10.4/babel-core/lib/transformation/file/options/option-manager.js:204:17
    at Array.map (native)
    at Function.normalisePlugins (/Users/kevinli/Documents/project/vuepack/node_modules/.npminstall/babel-core/6.10.4/babel-core/lib/transformation/file/options/option-manager.js:180:20)
    at OptionManager.mergeOptions (/Users/kevinli/Documents/project/vuepack/node_modules/.npminstall/babel-core/6.10.4/babel-core/lib/transformation/file/options/option-manager.js:300:36)
    at OptionManager.addConfig (/Users/kevinli/Documents/project/vuepack/node_modules/.npminstall/babel-core/6.10.4/babel-core/lib/transformation/file/options/option-manager.js:232:10)
    at OptionManager.findConfigs (/Users/kevinli/Documents/project/vuepack/node_modules/.npminstall/babel-core/6.10.4/babel-core/lib/transformation/file/options/option-manager.js:436:16)
    at OptionManager.init (/Users/kevinli/Documents/project/vuepack/node_modules/.npminstall/babel-core/6.10.4/babel-core/lib/transformation/file/options/option-manager.js:484:12)
    at File.initOptions (/Users/kevinli/Documents/project/vuepack/node_modules/.npminstall/babel-core/6.10.4/babel-core/lib/transformation/file/index.js:223:65)
    at new File (/Users/kevinli/Documents/project/vuepack/node_modules/.npminstall/babel-core/6.10.4/babel-core/lib/transformation/file/index.js:140:24)
    at Pipeline.transform (/Users/kevinli/Documents/project/vuepack/node_modules/.npminstall/babel-core/6.10.4/babel-core/lib/transformation/pipeline.js:46:16)
    at transpile (/Users/kevinli/Documents/project/vuepack/node_modules/.npminstall/babel-loader/6.2.4/babel-loader/index.js:14:22)
    at Object.module.exports (/Users/kevinli/Documents/project/vuepack/node_modules/.npminstall/babel-loader/6.2.4/babel-loader/index.js:88:12)
 @ multi main
webpack: bundle is now VALID.
 ` ` `
node_modeles 删了 在重新安装模块还是不行。。。

Production build failing: error from UglifyJs

Hello,

when i build (npm run build) fresh vuepack, it compiles OK.
however, when i import some module, for example jquery, prod. build fails with error:

ERROR in vendor.795f4ce9.js from UglifyJs
SyntaxError: Unexpected token: name (cache) [vendor.795f4ce9.js:18852,4]

Is there some configuration I can change to supress this error?

thank you very much.

Explain how to serve/dist static files

Sorry I'm a relative newbie, but it's not at all clear to me how to make the dev server serve static files (in my case I have some .json files from json-generator.com to mock an API) or how to have these files included in the output of npm run build. Could you add something in the README on how to achieve this?

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.