Skip to content

Problem with webpack and react #68

@robertobrogi

Description

@robertobrogi

Describe the bug

Impossible to load a unity canvas:

image

Desktop (please complete the following information):

  • Browser [chrome, Firefox]

Additional context
we used webpack cli:
"webpack": "^4.15.1",
"webpack-cli": "^3.0.8",
"webpack-dev-server": "^3.1.4"

in webpack we have:

new CopyWebpackPlugin([
{from:'src/assets',to:'assets'},
{from:'src/skins',to:'skins'},
{from:'src/images',to:'images'},
{from:'src/fonts',to:'fonts'},
{from:'src/i18n',to:'i18n'},
{from:'src/webGL',to:'webGL'}
])

in our structure we have:

scr/webGL

inside:
Build/
TemplatesData
index.html

and this init component:

this.unityContent = new UnityContent( "webGL/Build/webGl.json", "webGL/Build/UnityLoader.js" );

whats wrong!??! there is a webpack problem?

we don't have a public folder....

output: { filename: 'main.js', path: path.resolve(__dirname, '..', 'dist'), publicPath: '/' // necessary for HMR to know where to load the hot update chunks },

please help....

thanks a lot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions