fix webpack

This commit is contained in:
ajuvercr 2019-09-22 11:58:47 +02:00
parent 72338ad466
commit 641fee7ee7
3 changed files with 6 additions and 6 deletions

View file

@ -1,5 +1,3 @@
import { Game } from "planetwars";
import { Shader } from "./webgl/shader"
import { set_instance } from './index.ts' import { set_instance } from './index.ts'
import { } from './games.ts' // IMPORT GAMES PLEASE, thank you webpack <3 import { } from './games.ts' // IMPORT GAMES PLEASE, thank you webpack <3

View file

@ -2,11 +2,12 @@
"name": "create-wasm-app", "name": "create-wasm-app",
"version": "0.1.0", "version": "0.1.0",
"description": "create an app to consume rust-generated wasm packages", "description": "create an app to consume rust-generated wasm packages",
"main": "dist/index.js", "main": "./bootstrap.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"scripts": { "scripts": {
"develop": "webpack --mode development --watch",
"build": "webpack --config webpack.config.js", "build": "webpack --config webpack.config.js",
"start": "webpack-dev-server" "start": "webpack-dev-server --content-base dist/"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View file

@ -17,8 +17,9 @@ module.exports = {
extensions: [ '.tsx', '.ts', '.js', '.wasm' ] extensions: [ '.tsx', '.ts', '.js', '.wasm' ]
}, },
output: { output: {
filename: 'bootstrap.js', path: path.join(__dirname, 'dist'),
path: path.resolve(__dirname, 'dist') publicPath: '/',
filename: 'bootstrap.js'
}, },
plugins: [ plugins: [
new CopyWebpackPlugin(['index.html']) new CopyWebpackPlugin(['index.html'])