Giter Site home page Giter Site logo

cesiumjs-webpack-boilerplate's People

Contributors

maxdow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cesiumjs-webpack-boilerplate's Issues

webpack2 error

Thanks maxdow, It is really fantasy! Iโ€™m a beginner in webpack and try to move your project to angular 2 cli and get webpack.config.js through ng eject. And I notice the angular 2 use Webpack 2. So I upgrade the webpack and webpack-dev to

"webpack": "^2.2.0 ",
"webpack-dev-server": "~2.4.2"

in your project. Current pacage.json file is:

{
"name": "cesium-webpack-boilerplate",
"version": "1.1.0",
"description": "A boilerplate for cesiumjs",
"main": "app.js",
"scripts": {
"clean": "mkdirp public & rimraf public/*",
"build": "npm run clean && cpr node_modules/cesium/Build/Cesium public && webpack --config config/webpack.config.js --progress",
"devserver": "webpack-dev-server --config config/webpack.config.js --progress --watch",
"dev": "npm run build && npm run devserver",
"release": "npm run build -- --optimize-minimize"
},
"author": "Maxime Warnier",
"license": "MIT",
"dependencies": {
"cesium": "^1.19.0"
},
"devDependencies": {
"cpr": "^1.1.2",
"css-loader": "^0.23.1",
"file-loader": "^0.9.0",
"html-webpack-plugin": "^2.22.0",
"mkdirp": "^0.5.1",
"rimraf": "^2.5.2",
"script-loader": "^0.7.0",
"style-loader": "^0.13.0",

"webpack": "^2.2.0 ",
"webpack-dev-server": "~2.4.2"

}
}

Current Webpack.config.js is

var HtmlPlugin = require("html-webpack-plugin");
const path = require('path');
module.exports = {
entry: "./src/app.js",
output: {
path: path.join(process.cwd(), "public"),
filename: "bundle.js",
sourcePrefix: ""
},
plugins: [
new HtmlPlugin({
template: "./src/index.html",
inject: "body"
})
],
devServer: {
contentBase: path.join(process.cwd(), "public")
},
module: {
unknownContextCritical: false,
loaders: [
{ test: /.css$/, loader: "style-loader!css-loader" },
{
test: /.(png|gif|jpg|jpeg)$/,
loader: "file-loader"
},
{ test: /Cesium.js$/, loader: "script-loader" }
]
}
};

But I get errors, when I debug the project.

Error constructing CesiumWidget.
Visit http://get.webgl.org to verify that your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below:
Error: Cannot find module "."
Error: Cannot find module "."
at webpackMissingModule (http://localhost:8080/vendor.bundle.js:31564:69)
at buildModuleUrl (http://localhost:8080/vendor.bundle.js:31564:147)
at new Globe (http://localhost:8080/vendor.bundle.js:187847:34)
at new CesiumWidget (http://localhost:8080/vendor.bundle.js:228862:25)
at new Viewer (http://localhost:8080/vendor.bundle.js:234446:28)
at Object.358 (http://localhost:8080/main.bundle.js:59:14)
at webpack_require (http://localhost:8080/inline.bundle.js:55:30)
at Object.876 (http://localhost:8080/main.bundle.js:195:18)
at webpack_require (http://localhost:8080/inline.bundle.js:55:30)
at webpackJsonpCallback (http://localhost:8080/inline.bundle.js:26:23)
CesiumWidget.showErrorPanel
CesiumWidget
Viewer
358
webpack_require
876
webpack_require
webpackJsonpCallback
(anonymous function)
Uncaught Error: Cannot find module "."
webpackMissingModule
buildModuleUrl
Globe
CesiumWidget
Viewer
358
webpack_require
876
webpack_require
webpackJsonpCallback
(anonymous function)
Angular is running in the development mode. Call enableProdMode() to enable the production mode.

Make a release task

  • load Cesium unminified for dev and minified version only at release
  • make a separate webpack conf for production

Webpack build does not move Images or Textures

Hi maxdow,

I'm very new to Webpack, but not to Cesium. I did everything according to your specification in the README, but when I open the webpage I get this:

screen shot 2016-08-01 at 12 28 07 pm

Is there any way to make Webpack copy over the contents of the cesium/Source/Widgets/Images and cesium/Source/Assets directories into the ./public directory?

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.